summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gerrit 2.0.14.1v2.0.14.1Shawn O. Pearce2009-06-161-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix bad diff display near empty comment caused editsShawn O. Pearce2009-06-161-12/+14
| | | | | | | | | | | | | | | | | In 974daeef2121 we fixed GERRIT-66, a bug about not showing comments if they were outside of the context of an edit being displayed in the viewer. Unfortunately the fixed hinged around creating an empty Edit object, thus forcing the hunk surrounding the comment to appear. This threw off the display code, causing it to render some lines twice, and in other cases, to omit lines entirely. We now filter out the unnecessary empty Edit instances within a hunk, as they served their purpose to hold open the hunk's context large enough for the viewer to get the lines necessary, but leaving them in nearby to other Edits may cause display errors. Bug: GERRIT-220 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add toString debugging aids to SparseFileContentShawn O. Pearce2009-06-161-0/+18
| | | | | | | | These methods help inspect the object state from within an IDE debugger, as its shows the more interesting portion, which is the range of lines the content object covers. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Document git receive-pack with Gerrit optionsShawn O. Pearce2009-06-162-1/+101
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix --reviewer during replace patch setShawn O. Pearce2009-06-151-1/+3
| | | | | | | | | | | | | | When passing --reviewer=jdoe@example.com during a replace of an existing change we may already have the reviewer registered on this change (e.g. it was added when the change was created) so we can't insert the ChangeApproval again for the same user on the same change entity. Instead we need to skip it. This was broken in e6b34af43c when I pulled the common "insert dummy approval" code into a single method, the guard to protect the already existing reviewer case accidentally got dropped. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix stack trace capture in Receive error pathShawn O. Pearce2009-06-151-2/+2
| | | | | | | If an upload-replace fails, we want to know why in the server log so we can troubleshoot any problems. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Ensure RevCommit's body buffer is available when neededShawn O. Pearce2009-06-152-0/+5
| | | | | | | | | | | | | | | | | Recently JGit's RevWalk class has changed to more aggressively discard a RevCommit's raw byte[] buffer if the library thinks the application won't want that additional message data. Since we are using the same RevCommit instance multiple times, we may need to ensure the buffer is available before we attempt to parse additional data from it, like the committer name. This should resolve difficult to reproduce NPEs we are seeing while replacing a patch set on an existing change. It apears as though the commit may already be parsed, but was flagged as uninteresting, so the pending generator discarded the buffer, but then later become an interesting commit, so the buffer is now wanted, but is missing. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Start 2.0.15 developmentShawn O. Pearce2009-06-151-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* gerrit 2.0.14v2.0.14Shawn O. Pearce2009-06-151-1/+1
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Document the new gerrit-cherry-pick commandShawn O. Pearce2009-06-152-0/+53
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Update JGit to 0.4.0-398-ge866578Shawn O. Pearce2009-06-154-4/+4
| | | | Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't try to auto-close changes on branch deleteShawn O. Pearce2009-06-151-4/+8
| | | | | | | On a branch delete, there's no changes to close. On branch create, there's no base commit. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Create gerrit-cherry-pick for client usageShawn O. Pearce2009-06-132-0/+207
| | | | | | | | | | | | | | | | | | | | End users can now obtain the gerrit-cherry-pick script by fetching it with scp: scp -P 29418 review.source.android.com:bin/gerrit-cherry-pick ~/bin Arguments passed to the script represent changes or patch sets like repo download would accept. The script executes git fetch to ensure the objects are available locally, then passes the changes through git am to apply them to the current branch. Common git am workflow is supported, including adding a new Signed-off-by line for the caller, and fixing broken whitespace. Later the cherry-picked changes can be automatically closed out by uploading them back as replacement patch sets. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add a micro scp daemon to our SSHDShawn O. Pearce2009-06-134-0/+341
| | | | | | | | This daemon can host static files contained within the Gerrit JAR, for clients to download via scp. The idea is to make utilities easily available for download from the command line. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix compile error in PatchFileShawn O. Pearce2009-06-131-1/+1
| | | | | | | This was accidentally built against a bleeding edge version of JGit, where the API was changed. Move it back to the stable API. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Close change if a replacement patch set is already submittedShawn O. Pearce2009-06-131-80/+135
| | | | | | | | | If a replacement patch set is pushed to an open change and that new commit is already submitted to a branch, automatically close the change and mark it MERGED. Bug: GERRIT-54 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Fix double click on patch set SHA-1 to select only SHA-1Shawn O. Pearce2009-06-131-1/+1
| | | | | | | | | | | Because we had no space between the end of the SHA-1 and the start of the "(gitweb)" anchor many browsers selected both parts when a user double clicked on the SHA-1, thinking it was all one word. By always putting a space after the SHA-1 more browsers will see this as a word break and double clicking on the SHA-1 will only capture the SHA-1, leaving the "(gitweb)" anchor out. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Automatically close changes when a commit is pushed into a branchShawn O. Pearce2009-06-133-2/+150
| | | | | | | | | | If a commit is directly pushed into a branch and that commit is listed as a patch set of a change, we close the change and mark it MERGED, sending an email out to interested parties to announce that the change has been accepted. Bug: GERRIT-115 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use binary search when pulling lines from SparseFileContentShawn O. Pearce2009-06-131-10/+33
| | | | | | | | | This is more efficient then a linear search, especially during the contains(int) operation where we expect a large number of negative results when looking at the post-image content when whitespace is being ignored. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Display post-image lines in side-by-side view when ignoring spacesShawn O. Pearce2009-06-135-28/+82
| | | | | | | | | If we are ignoring whitespace, but a block of lines has had its indentation changed, we should show the post-image accurately by using the lines from the post-image buffer rather than using the lines from the pre-image buffer. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Use ValueChangedHandler for CheckBox update events in PatchScreenShawn O. Pearce2009-06-131-8/+8
| | | | | | | | | This is more correct, because GWT installs keyboard handlers as well as mouse click handlers to ensure the application is called when the value of the check box changes. Otherwise we may see spurious events, or miss events entirely. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Move PatchScriptSettings to .data packageShawn O. Pearce2009-06-139-10/+11
| | | | | | | This way its alongside its sibling PatchScript, as it really does describe that class. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Pass the PatchScriptSettings back as part of the PatchScriptShawn O. Pearce2009-06-134-29/+48
| | | | | | | | This way the UI has a more accurate representation of the input used when computing a PatchScript. In particular the Whitespace setting may be required to determine how to present data. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add "Ignore whitespace" to patch viewsShawn O. Pearce2009-06-1212-44/+171
| | | | | | | | Now a patch viewer can activate the "ignore whitespace" feature of git diff in order to view only the modified lines, ignoring any lines that differ only in leading (or trailing) whitespace. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Update executablewar to 1.2Shawn O. Pearce2009-06-121-1/+1
| | | | | | | | | | | | This new version helps debugging program code from an IDE, without building a WAR file first. Adding -DExecutable-War-Package=com.google.gerrit.pgm to the VM arguments section of a launch configuration is the magic necessary to make it run. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Merge change 10347Android Code Review2009-06-123-0/+32
|\ | | | | | | | | * changes: Added a checkbox to switch between contextual/full file diff in the diff view.
| * Added a checkbox to switch between contextual/full file diff in the diff view.Cedric Beust2009-06-113-0/+32
| | | | | | | | | | | | | | | | Sometimes being able to view the whole file is useful, even if the user has context normally set to the default of 10 lines. The new checkbox at the top of a patch screen permits the user to temporarily change the context of this one view to whole file.
* | Update JGit to 0.4.0-388-gd3d9379Shawn O. Pearce2009-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | Upgrade fixes at least two annoying bugs: - unnecessary stderr logging in replication transport (GERRIT-199) - infinite loop during merge of some types of trees Bug: GERRIT-199 Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Update SSHD to 1.0-r784137Shawn O. Pearce2009-06-122-3/+2
|/ | | | | | This now uses MINA 2.0.0-M6. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Provide feedback when a reviewer is invalidShawn O. Pearce2009-06-088-3/+53
| | | | | | | | | Instead of silently failing to add a reviewer whose email we don't recognize, alert the user that the user isn't registered, so they can adjust their input, or ask that person to create an account. Bug: GERRIT-190 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Show email address matched by completion rather than preferredShawn O. Pearce2009-06-084-9/+39
| | | | | | | | | | By showing the address entered by the user in the list of possible completions it is less likely the user will be fooled into taking the wrong account, especially if there are multiple users created with a common name (like John Smith). Bug: GERRIT-191 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Don't permit overlapping Edit instances in patch scriptsShawn O. Pearce2009-06-081-2/+16
| | | | | | | | | We can't overlap an Edit instance. If we do, bad things happen, like the web request handler gets stuck in an infinite loop trying to make the patch script for the browser, or the web UI renders the same file line multiple times. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Enable groups to manage contributor agreementsShawn O. Pearce2009-06-0811-48/+296
| | | | | | | | | | | | | | | | | | For a corporate style contributor agreement there are typically more than one account which is covered by that agreement, and the CLA is actually between the company and the project leaders, not the users who are listed out on that agreement. Permission as to who is an authorized user under that agreement should be managed by the company who made the agreement as employees enter the company, leave, or are shifted to different job functions. By creating a pair of groups in Gerrit, e.g. "Initech Users" and "Initech Admins", with the later being the owner of the former, the Initech personnel can manage their own authorized users list, without involving the Gerrit site administrators. Bug: GERRIT-17 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add automaticMembership flag to account groupsShawn O. Pearce2009-06-086-22/+47
| | | | | | | | | | | | | If set to true, the group's membership list will be hidden from view, and cannot be accessed or modified. Instead it is assumed that the members are drawn from an external data source, and replicated into Gerrit through some external means such as direct database updates. The two standard groups for anonymous and registered users behaves like this, in that their membership is derived on the fly, and is not visible, or modifiable. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Audit group member addition and removalsShawn O. Pearce2009-06-086-8/+206
| | | | | | | | The new account_group_members_audit table contains a record for each time a user enters or leaves a group, including which user did the addition or removal. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Convert command line programs to use args4jShawn O. Pearce2009-06-087-46/+118
| | | | | | | | Our command line programs started by `java -jar gerrit.war ...` now use args4j for their command line argument processing. This better matches with now the SSHD based commands are processed. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Correctly handle comments after last hunk of patchShawn O. Pearce2009-06-081-8/+9
| | | | | | | | | If a comment appears after the last hunk of the patch, it won't match any of the Edit instances in the edit list. Instead we need to use the last Edit instance's end point to remap the line number to the other file space. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Always show comments in patch views, even if no edit existsShawn O. Pearce2009-06-075-40/+186
| | | | | | | | | | | | | | If a comment exists but is not within the context region of an edit, we still want to ensure the comment shows to the reader, as it may still be an important part of the review. By creating a 0-length edit around a visible comment we ensure that the packContent() method will format the necessary context lines to the destination buffers, and we also ensure that the patch views in the client UI will draw a hunk around the region. Bug: GERRIT-66 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Remove invalid usage of List.subList(int,int)Shawn O. Pearce2009-06-071-1/+7
| | | | | | | | GWT's List emulation does not support subList(int,int). Instead we must copy the list to a new list data structure, one element at a time, as there is no other efficient means of obtaining a sublist. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Add commit SHA-1 search to search panelShawn O. Pearce2009-06-0711-36/+209
| | | | | | | | | We now support searching for changes by commit SHA-1, in addition to searching by change number. The magic "/r/SHA-1" URLs are now just a rewrite to this particular search function. Bug: GERRIT-27 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Record the submitter in the reflog during mergeShawn O. Pearce2009-06-071-0/+18
| | | | | | | | Instead of recording the Gerrit server identity, record the identity of the end-user who performed the submit into the branch. Bug: GERRIT-174 Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor MergeOp.getSubmitter to return the ChangeApprovalShawn O. Pearce2009-06-071-5/+11
| | | | | | | This way we can reuse it for other cases where we don't know who submitted a change, but want to discover it. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Refactor submitter to PersonIdent mapping in MergeOpShawn O. Pearce2009-06-071-21/+27
| | | | | | | This permits us to reuse the logic for other contexts where we want to convert from the one to the other. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Skip the ssh:// download URL if the SSHD is unknownShawn O. Pearce2009-06-051-0/+1
| | | | | | | | | If the SSHD binds only to the loopback (e.g. in a developer hosted mode, this might make sense to configure) we won't have a name for the URL to display. Skip the ssh:// URL, rather than crashing on an NPE. Signed-off-by: Shawn O. Pearce <sop@google.com>
* documentation: Use git config --file pathShawn O. Pearce2009-06-053-10/+10
| | | | | | | | This is supported by much older versions of git, as well as the bleeding edge development version. Users are more likely to be able to follow the instructions now, with any version of git. Signed-off-by: Shawn O. Pearce <sop@google.com>
* Display branch name next to project in change listEric Tsai2009-06-064-2/+14
| | | | Bug: GERRIT-177
* Merge change 10282Android Code Review2009-06-041-0/+6
|\ | | | | | | | | * changes: Don't allow commits to replace in wrong project
| * Don't allow commits to replace in wrong projectShawn O. Pearce2009-06-041-0/+6
| | | | | | | | | | | | | | | | | | If the change is slated to a different project than the one the commit was uploaded to, don't permit the replacement to take place. This could be caused by a simple typo by the user, and we shouldn't create a corrupt server side state because of it. Signed-off-by: Shawn O. Pearce <sop@google.com>
* | Small doc updates.Cedric Beust2009-06-042-1/+8
|/ | | | | - Alternate doc explanation for people using an older git version. - How to start PostgreSQL
* Fix n/p on a file with only one editShawn O. Pearce2009-06-033-2/+13
| | | | | | | | | | | | | | | | | Back in 8724604fa9 ("Make n/p only honor comments on add/delete") I tried to teach n/p keyboard shortcuts to jump to comments when the change is the addition of a file, or the deletion of a file, as the entire thing is one giant edit list. Unfortunately this was based around just having 1 edit, and not checking the *type* of the file change, so n/p broke when there was exactly one region affected in the file. We now only match comments if there is exactly one hunk and either side of the patch script is empty (indicating full add or delete). Bug: GERRIT-213 Signed-off-by: Shawn O. Pearce <sop@google.com>