* stable-2.10:
Set 'line-height: normal' for lines in side-by-side diff
Add missing documentation of the groups_members cache
SideBySide2: Show file name in window title again
Fix documentation of the default value for core.streamFileThreshold
Bump version to 2.9.2
Change-Id: Ibea6f3291015f1dc707057537916e00d5a93c501
* stable-2.9:
Set 'line-height: normal' for lines in side-by-side diff
Add missing documentation of the groups_members cache
SideBySide2: Show file name in window title again
Fix documentation of the default value for core.streamFileThreshold
Bump version to 2.9.2
Conflicts:
VERSION
gerrit-extension-api/pom.xml
gerrit-plugin-api/pom.xml
gerrit-plugin-archetype/pom.xml
gerrit-plugin-gwt-archetype/pom.xml
gerrit-plugin-gwtui/pom.xml
gerrit-plugin-js-archetype/pom.xml
gerrit-war/pom.xml
Change-Id: Ie294e17f71d3df1ec3d52300e22ea5e83834f73f
On some browsers, accented characters are not displayed correctly
because the line is not high enough.
Bug: Issue 2970
Change-Id: I7a4e64f69f7d3c96a58d1bd1930d9f6c23896d14
I7659ae66b provided wrong implementation of hashCode(). Objects.hash()
calls Arrays.hashCode(values) on provided values, which in turn calls
hashCode() on its parameters, which in turn leads to endless recursion,
and in the end to StackOverflowError error.
Change-Id: I709239cbd27592765319b15c13044ab9aad738c0
The PGPPublicKeyRingCollection constructor was deprecated in
Bouncycastle v1.51.
Use BcPGPPublicKeyRingCollection instead.
Change-Id: I5bc4fb4927ba37ecbf7d3763809acc2f53d7fd4e
For supporting users it is often useful to send them links to a
certain section in the documentation. The Gerrit documenation contains
a lot of anchors, but they are not easily accessible. If the section
is linked from the TOC the link to the section can be gained by
clicking on the link in the TOC. To link to other elements it is often
needed to check the HTML source code to find out the link target.
Make the links to section headings and anchors easier accessible by
displaying a link icon when the mouse is hovered over the heading or
anchor. By clicking on the link icon the page anchor is set and the
link can be copied from the address bar of the browser.
Having this functionality for anchors is especially useful for linking
to certain configuration parameters in the config-gerrit.html page.
The link icon is taken from the 'Freebie: Application Icon Set' [1]
which is licensed under the Creative Commons Attribution 3.0 Unported
License [2].
[1] http://tympanus.net/codrops/2012/10/02/freebie-application-icon-set-png-psd-csh/
[2] http://creativecommons.org/licenses/by/3.0/deed.en_US
Change-Id: I4377ea23ad76143fd4caa78afc30b82690e533ff
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
Move MergeableInfo into gerrit-extension-api so we can add a method to
RevisionAPI returning it. Add an acceptance test exercising this new
API, which also exercises Mergeable.
Mergeable had never been exercised in acceptance tests, so this
flushed out some bugs. For one thing, we were passing nulls to the
MergeabilityCacheImpl.LoadHelper constructor, which checks for
non-nulls. For another, particularly galling, we failed to set the
mergeable field in the result of /mergeable in case of a cache hit.
Change-Id: Ib77d994b65af439e56ebc112f3000a71b4222c9b
There was a bug in the commit creation code where it used the parent
tree ID in the hash to compute the Change-Id. (This is somewhat
understandable since it was using CommitCommand, which looks in the
work tree/index and thus does not know the new tree SHA-1 when
constructing the commit message.) This means that when creating two
changes against the same parent in rapid succession, e.g. to test
behavior of a side branch merging back to master, we might
nondeterministically end up with the same Change-Id, depending on
whether the clock in the PersonIdent advanced.
There is already a setInsertChangeId(boolean) method in CommitCommand,
so just use that instead, and parse the resulting Change-Id out of the
message.
Change-Id: Ie87524d324a14a949a14aada963a6de0b3df0b99
As soon as the GitReferenceUpdatedListener is fired, the GetChanges
task reads all open changes on the branch from the DB. There may be
many of these, and they may be stuck in the queue for a while, during
which time some of these changes may be submitted. Therefore we should
be rereading the changes from the DB when the index task starts, but
we weren't, we were using the previously-read Change entities.
Instead, pass a Change.Id into the Index task and reread it on task
execution time. We need another argument to pass the account ID for
the request context, but we choose this slight ugliness over holding a
tantalizing reference to a stale object.
Change-Id: I63f4b874d09d3e6fa35b7d3a82d0089982526f62
This appears to have been introduced by a clean auto-merge of 75472334
and 22e43cc8, the latter of which was merged into master from
stable-2.9.
While reordering, move the post-processing out of the transaction
block. We don't want to index or send emails if the DB update fails.
Change-Id: I0fd855062f0c3ed118e537ef80358863d4f61284
Using Provider<ReviewDb> causes ProvisionException when running the
tests:
Automatic ReviewDb only available in request scope
Change it to SchemaFactory<ReviewDb>.
Change-Id: I342bce45ac66a5d6c602f92059bed15abdbf4f11
In the old side by side diff screen, the name of the file being diffed
was shown in the window title. For some reason the code that set the
window title wasn't adopted from PatchScreen into SideBySide2.
Put the setting of the window title back in. Put it into onInitUI(),
since this was the place where it had first stood in PatchScreen.
SideBySide2 already displays the path on the page, so leave out the
setPageTitle() from PatchScreen, because this would display that path
again.
Also don't obtain the file name by finding the last slash with
lastIndexOf() and then taking the substring from there, but use
FileInfo.getFileName() instead. Searching for "lastIndexOf('/')" in the
whole project gives quite some occurences. I thought reusing something
might be a good idea.
Bug: Issue 2960
Change-Id: I12a280b8a437b60e4e2f779b81072117d45a1505
If the browser/user-agent sends a Content-Length header in the
request, JGit can stream the payload into the compressed object
format without holding the entire payload inside the server's
heap. This can reduce memory pressure when the user edits a
large XML file.
Push the RawInput down into the ChangeEditModifier, giving it access
to the expected length. If the length is defined (>= 0), JGit can
stream the payload from the input. If the user agent failed to
supply a length, the payload must be buffered to compute it.
Cleanup the ChangeEditModifier management of the tree by doing blob
insertion before the tree is updated. This allows passing in only
the ObjectId, which is cleaner for the Git style code.
When restoring an entry with RESTORE_ENTRY, reset the file mode to
the original mode. This preserves the execute bit or symlink mode,
instead of resetting them to regular file.
When editing an entry, try to keep the existing mode instead of
forcing to a regular file. This allows editing an executable script
file and keeping the file executable.
Change-Id: I8f45fd4a4a45cef266d994c2457d3e100231c312
Since indexing is generally done after any modification operations,
using a deleted ChangeData when indexing a deleted change is just
asking for trouble; most ChangeData methods (reasonably) assume that
the change exists. Instead, just use the form of the method that
passes in the ID.
Change the method that takes an integer ID to take a Change.Id object.
In almost all cases we already have one of these handy, and this is
more consistent with public interfaces elsewhere in Gerrit.
A fortunate side effect is that async deletes should happen slightly
faster, since we no longer need to open a DB connection and produce a
ChangeData in the delete codepath.
Change-Id: I353522b52188de11353ca26a7ba90a2ca462e404
* stable-2.10:
Remove uneeded dependency in ChangesCollection
Delete a change from the index when it is not in the DB
Change-Id: I02a4773dd581c29704a7cc45c5225258d657f836
* stable-2.9:
Remove uneeded dependency in ChangesCollection
Delete a change from the index when it is not in the DB
Change-Id: Ifed2fc5073071e9d4f457aa02b73caa2b6173599
Change I1db5373e31585e99c5f45e05274d86d69b4f24e6 added an unneeded
dependency in ChangesCollection.
Change-Id: I2f8609416518495624eda9e08309a6e14863fbe8
If for some reason the secondary index is out of date, i.e. the change
was deleted from the database but wasn't deleted from the secondary
index, it was impossible to re-index (remove) that change.
Add logic to automatically remove the change from the secondary index
if this change is requested through the Change REST API endpoint and
doesn't exist in the database.
If a user click on search result from a stale change, he will a get a
404 page and the change will be removed from the index.
To fix the problem without opening the change page, run a command like:
curl --user <user name> -X POST http://<host>:<port>/a/changes/<change id>/index
Issue: 2996
Change-Id: I1db5373e31585e99c5f45e05274d86d69b4f24e6
Since commit bfe9eec1 the default value for core.streamFileThreshold
is 25% of the available JVM heap, limited to 2048m.
Change-Id: I9308875e30470dc33bf9b437909842e87f974141
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
* stable-2.10:
Inject InitStep members again before calling postRun.
SSHD: Update to 0.13.0
Bump SSHD Mina version to 2.0.8
Bump Bouncycastle version to 1.51
Update EncryptedContactStore to not use deprecated/removed methods
Change-Id: I7853def28109357e8629f1384f90d4630da00483
* stable-2.9:
Inject InitStep members again before calling postRun.
SSHD: Update to 0.13.0
Bump SSHD Mina version to 2.0.8
Bump Bouncycastle version to 1.51
Update EncryptedContactStore to not use deprecated/removed methods
Change-Id: I4d67f79b9614289f222f9adcc8c513813ab3035c
* changes:
SSHD: Update to 0.13.0
Bump SSHD Mina version to 2.0.8
Bump Bouncycastle version to 1.51
Update EncryptedContactStore to not use deprecated/removed methods