| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
| |
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
| |
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
| |
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This way its alongside its sibling PatchScript, as it really does
describe that class.
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| | |
* changes:
Added a checkbox to switch between contextual/full file diff in the diff view.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
| |
This now uses MINA 2.0.0-M6.
Signed-off-by: Shawn O. Pearce <sop@google.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Bug: GERRIT-177
|
|\
| |
| |
| |
| | |
* changes:
Don't allow commits to replace in wrong project
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
| |
- Alternate doc explanation for people using an older git version.
- How to start PostgreSQL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|