* stable-2.12:
Add correct license for asciidoctor
SshDaemon: Set up the session timeout to make sshd.idleTimeout work
Change-Id: I52336ac1853e37b3c769e3592c579a660c067851
* stable-2.11:
Add correct license for asciidoctor
SshDaemon: Set up the session timeout to make sshd.idleTimeout work
Change-Id: If8fd11f198345d6a92fff3fa64851bd0e2b3376d
Change If1ee984c77 introduced asciidoctor, but incorrectly set the license
as Apache2. In fact it is licensed under MIT [1].
Add the correct license.
[1] https://github.com/asciidoctor/asciidoctor/blob/master/LICENSE.adoc
Change-Id: I7301b2efbc25daa48e63cef36259c904574c19a4
Introduces the gr-syntax-layer element. This element works as an
annotation layer that is configured with the diff and asynchronously
computes/applies syntax for the diff.
Introduces a custom build of Highlight.js which gr-syntax-layer makes
use of. Building the script is documented in
scripts/vendor/highlight/building.md.
The layer is connected to the annotation pipeline in gr-diff-builder as
the lowest layer and syntax processing is triggered only after a diff
has been completely rendered.
A number of styles are added to the gr-diff element for syntax markers.
Tests added for gr-syntax-layer.
Bug: Issue 3916
Change-Id: Ic33e40f4fe39dfce1a62de133cfaf32be5e3f25a
Using CodeMirror's lint addon on the UI to display the blame
annotations. It works on both sides of the side-by-side
diff and also supports the auto-merge commit. It requires manual
step to enable the annotations to avoid any unnecessary git
processing and network traffic between the server and client.
Introduces a new dependency on blame-cache in gerrit-server
to reuse BlameCache.
In a following change, the gutter showing the blame info will be
made clickable. Clicking on the gutter will open a new tab that
takes the user to the corresponding change in Gerrit.
The commit SHA-1 hashes are currently not selectable. Making it
so might require an upstream change in CodeMirror's lint addon.
Bug: Issue 1642
Change-Id: I6267d30cbee448f8137e11c7120959dc424eaeeb
I've started to maintain a minified CodeMirror distribution at
https://www.npmjs.com/package/codemirror-minified. It is released
on both NPM and WebJars with a version number that matches the
current version of CodeMirror. It comes with all non-test
JavaScript and CSS files minified.
Commit 7b11d6ad305f5106f3116146b4c442e81aa63b3f
(change I05d925c94a3c0368366e9d3ad109cf84492810fc) already turned off
CodeMirror obfuscation in non-release builds. With this further change,
we can avoid running Closure Compiler altogether.
Removed the special case for CodeMirror in
Documentation/gen_licenses.py since it's no longer needed.
Removed the now unused js_minify() rule and the rules for downloading
Closure Compiler and its externs. They will be re-added to tools/js for
minifying PolyGerrit.
Change-Id: I36b4c29e2300384f49d3660266cc7b89140c9faf
Follow this change: I54dab6649 that updated gitiles project and apply
the upgrade on Gerrit core as well.
Change-Id: I9fcd360d96b69c31246c722a528ca396ba7b7f2f
Additionally fix a bug in bower2buck.py where it would
bail when a license is not specified in a Bower package
info response.
[1] http://caniuse.com/#feat=fetch
[2] http://github.github.io/fetch/
Change-Id: Ibf754aab98bab6e34b7a9fb5d6c9801bb612f5d5
Other parts of the UI are using Silk Icons, and the link icon
from this set is nicer than the one currently used.
This removes dependency on the "Freebie: Application Icon Set"
license.
Change-Id: I1db8f2c1dc976001975b733ced1d04bdd9b86e07
Upgraded dependency for javassist.jar from 3.17.1 to 3.18.1
to allow powermock unit tests involving RevCommit.class to complete.
Problem started to appear after Change-Id: Ib4c82bbcf of 22-January
See https://issues.jboss.org/browse/JASSIST-190 for info on the bug
being fixed (related to multicatch syntax in java7 introduced in latest
RevCommit class)
Change-Id: I9286a6892ba3e9af14d579e91cdbfcdc08b170f8
Consume JGit as first third party library from its own cell. Normally
the cell is defined as lib/jgit directory. It can be easily replaced
with CLI:
buck build --config repositories.jgit=path/to/dev/jgit gerrit
or tweaking the .buckconfig:
[repositories]
jgit = path/to/dev/jgit
The former approach is sufficient to build and run the test from the
CLI, the latter is needed to generate eclipse project.
To isolate the JGit rules in its own cell some refactoring was needed.
JGit patch for GWT module was moved to gerrit-patch-jgit project, and
some symlinks were needed for maven machinery to work. include_defs()
doesn't work for now across cell boundaries, and native `buck fetch`
feature still has some limitations: [1]. Moreover, excluding paths,
unsigning JARs and license linking should be re-implemented on top
of it.
[1] https://github.com/facebook/buck/issues/602
Test Plan:
Normal gerrit build and the build with hijacked JGit cell should work
in both standalone (gerrit.war) and Eclipse environment. Note, that
to test --config repositories.jgit=path/to/dev/jgit use case, the most
recent JGit tree must be used, that contains Buck driven build
implementation.
Change-Id: I39f2d5d75bbac88804406d6242b5e714f4916926
There are no functional changes in this version. The only differences
are:
- The version number is no longer a snapshot
- The group ID is changed to com.google.gerrit
- It is now consumed from Maven Central rather than the Google bucket
Change-Id: I0dbdd306377b6a0ac9b891235e0c6087e0808640
This is intended to replace the next*Id() methods in ReviewDb. We
increment a counter stored in a blob on refs/sequences/*, and allow
multiple processes to reserve chunks of the number space so they can
operate concurrently. The resulting IDs are not quite monotonic, but
this is a common feature of distributed unique ID assignment; the
careful observer will note the same behavior on gerrit-review, for
example.
Change-Id: Ia5f59233df97b7eff71b1ec6af1d816975f28ad9
The "drifty" icon looks ugly and out of place compared with the Silk
Icons which have recently been introduced.
Replace it with a Silk icon.
Change-Id: Idec6e968e001955b725e19410d8acb02a3c09537
The silk icons [1] look a little more modern than the tango icons and
the set contains a bigger variation of icons.
The silk icons are available under the Creative Commons Attribution
3.0 License.
For some icons (arrowDown.png, arrowUp.png, arrowRight.png,
draftComments.png and queryIcon.png) the origin is unclear and hence
we should no longer use them.
The origin of deleteNormal.png and deleteHover.png is also unclear but
at the moment we don't have a good replacement for them.
The magnifying glass icon that was used as query icon is replaced by a
spy glasses icon. This is because the magnifying glass is associated
with zoom and not with find/query.
Some icons from the tango icon library [2] (goNext.png, goPrev.png,
goUp.png, listAdd.png) are still used because there is no suitable
replacement for them in the silk icons set.
Some unused icons have been removed.
In the source code the icons are now grouped by origin. This should
make it more obvious when icons of unknown origin are added.
[1] http://famfamfam.com/lab/icons/silk/
[2] http://tango.freedesktop.org/Tango_Icon_Library
Change-Id: I5e153647c60410115d06da1a706a0ec1ecdfcaed
Signed-off-by: Edwin Kempin <ekempin@google.com>
* stable-2.12:
Do not wrap nav links in unified diff view
Add some tests for ResourceServlet
Add fake HttpServlet{Request,Response} for testing
Eclipse: List GWT deps after non-GWT deps
Change-Id: I0b828736a9e4c002c2086e64c620ab427eadb1c8
These are small tests using a custom subclass of ResourceServlet
pointing at in in-memory filesystem using Jimfs. Larger tests that
actually check the mappings in StaticModule are somewhat trickier.
These tests are not yet comprehensive, but were enough to identify one
bug in 404 behavior, where an uncaught NoSuchFileException turned what
should have been a 404 into a 500.
Change-Id: Iee8059444a66f9be608c6605ec16cc1b46c443e2
Add support for downloading npm binaries including dependencies and
running them in buck genrules. In npm land, transitive dependencies
are generally included in the package distribution, and there are a
*lot* of them. Since we aren't redistributing these binaries and
they're only part of the build process, we don't have to worry too
much about licensing, only that they don't have anything totally
crazy.
We assume packages have a certain format and we can detect the binary
to run from the genrule output filename. Actually running the binary
is tricky as well, since we have to extract it first. But it might be
large, so we don't want to extract it on every invocation; and naive
extraction to a common location (in buck-out) is racy. So we need a
custom extractor scheme using atomic rename to make this work.
Download bower as an npm package and use it to download bower
packages. Bower packages can come from a variety of sources, usually
git repositories, so we can't simply use download_file. There is
additional logic in bower to read bower.json and strip out unneeded
files, so I didn't want to get into reimplementing that. The tricky
thing about bower is convincing it to avoid transitive dependencies so
we can let Buck handle parallelism and caching. To do this, we need to
read the package information from the upstream bower repository, and
explicitly ignore all listed dependencies when downloading.
We combine the flattened list of bower packages in a single
bower_components rule. It would be nice to have deps of each
bower_component so we didn't need to flatten these, but Buck genrules
don't have deps so this is a nonstarter. Considering we only expect to
have a single bower_components for the whole project, hopefully this
is not too onerous.
This change just gets us the bower_components directory. We still have
some work to do to use this from Gerrit. Plus even more work to
replace the gulpfile and actually package this stuff together into a
compiled JS app for the war distribution.
Change-Id: Id277d2d812ffcc3bce87ff00b5894bacdffc038e
* stable-2.11:
Fix double slash on URL when switching account.
Use image instead of Unicode Character for Copy Button
Change-Id: I6474cf80326eb80e42505c050f9ed42a16af43c3
Due to the incompatibility of fonts and encoding in some environments,
some browsers could not render the Copy Button correctly.
This change uses instead a clipboard image to replace the unstable
Unicode Character for the Copy Button.
The image is open sourced and is discovered at:
http://uxrepo.com/icon/clipboard-by-ionicons
Also, license for the use of the image is included.
Change-Id: Ie7d55e8cde40df445d32e6b8fcab91cf8a0c05b7
In the current gwtorm implementation, column renames for columns
with a check constraint are not supported by Apache Derby.
To rename a column with a check constraint the column constraint
must be dropped manualy. After that the column can be renamed by
the gwtorm implementation. After the renaming the constraint can
be added again.
Test plan:
* Replace H2 with Apache Derby, add derby to Buck tests rules as
new dependency and run the tests with `buck test`
* Set up new site with Apache Derby database and perform the tests
Bug: Issue 3441
Change-Id: I46e719ed54ea633c127c7bcd381b882e3a9b37ba
This release contains some bug fixes and improvements: [1].
1.4 release line wasn't used, as it's still marked as beta
release.
[1] http://www.h2database.com/html/changelog.html
Change-Id: Idd3c31192aae657887158737a743703f9725e8e7
0.1.53 contains several bug fixes and new features
since 0.1.52.
http://www.jcraft.com/jsch/ChangeLog
Change-Id: I7a3ff5217ad38c925200a1ac9df096f616157350
According to the change log the new version fixed some bugs and added
some new features: [1].
[1] http://www.jcraft.com/jsch/ChangeLog
Change-Id: Iff40eec5da1906c85c4325bb2cd14f996d849d6d
Release 19 includes several bug fixes and API updates [1].
- Remove "unchecked" warning suppressions that are no longer
necessary.
- Replace calls to deprecated Futures.transform() with new
Futures.transformAsync().
- Use CharMatcher's static factory methods instead of constants
that will later be deprecated.
[1] https://github.com/google/guava/wiki/Release19
Change-Id: I512ddc6ccf7ebaac0c16557d3b0d62ee1394de37
Grappa library was chosen by Gitiles project to implement markdown
rendering. Grappa library includes non-relocated parboiled library
that is incompatible with vanilla parboiled library.
When Grappa driven gitiles-plugin is deployed in Gerrit, there is
a class collision. The only way to make them co-exist is to relocate
one of them, using JarJar utility. But doing it can be error prone
as this issue has shown: [2].
This change takes another approach and replace parboiled library in
Gerrit core with Grappa library. This fixed the deployment problem
with gitiles-plugin: markdown files rendering work as expected.
[1] https://github.com/fge/grappa
[2] https://github.com/sirthias/parboiled/issues/80
Change-Id: I793a84013468bf9fd07e62960bc2e789674ff35c
//Documentation:js_licenses.txt is an optional target to build
the closure of licenses that are compiled into the JavaScript
by the GWT compiler. This is a subset of what is inside of
licenses.txt, but this subset may be necessary in some cases.
Explicitly break some edges that would otherwise by found
in the build graph to avoid dragging in license information
that is not necessary in the partial report created by the
js_licenses.txt target.
Change-Id: Ibbebb3365faf8dccbcd02ad7ef82280255fc5245
Grappa library was chosen by Gitiles project to implement markdown
rendering. Grappa library includes non-relocated parboiled library
that is incompatible with vanilla parboiled library.
When Grappa driven gitiles-plugin is deployed in Gerrit, there is
a class collision. The only way to make them co-exist is to relocate
one of them, using JarJar utility. But doing it can be error prone
as this issue has shown: [2].
This change takes another approach and replace parboiled library in
Gerrit core with Grappa library. This fixed the deployment problem
with gitiles-plugin: markdown files rendering work as expected.
[1] https://github.com/fge/grappa
[2] https://github.com/sirthias/parboiled/issues/80
Change-Id: I793a84013468bf9fd07e62960bc2e789674ff35c
Change I4359067a downgraded JUnit to 4.10 because the index tests
for gerrit-review's backend use some of the basic testing library
in Gerrit and was unable to upgrade to JUnit 4.11.
According to Dave Borowitz's comment on [1], it is now possible to
upgrade to JUnit 4.11 again.
JUnit used to come bundled with hamcrest, but this is no longer the
case starting with 4.11, so we need to expose the hamcrest as well,
because some of the acceptance tests rely on hamcrest being exposed
via the JUnit dependency.
This reverts commit 29c7028495630edeedd99e9a7d053633643971f2.
[1] https://gerrit-review.googlesource.com/#/c/68551/
Change-Id: I7f501f4b6a8f600f372f5ee62f0713170bc474fb
This means we don't have to explicitly include guava and junit as
dependencies of any tests that use Truth. By default, Buck builds
java_library targets only with first order dependencies; transitive
dependencies are not considered.
Change-Id: Ibaa67de19c1ab7bb9c2d53f75fff94ca0f9779b5
Un-deprecates CollectionSubject, removing the need for many Iterable
casts. Removes the Subject.is() method, which is replaced by either
isEqualTo or isSameAs.
Change-Id: I58d725b3cc84947e98a1f9b18cc8d2d160f01c97
Bump the gwtorm version, since gwtorm changed Schema and
StatementExecutor to be AutoCloseable. This allows us to simplify many
callers.
While we're in there, fix some usages of more javax.sql classes like
Statement that became AutoCloseable in Java 7.
Change-Id: Icf86fdb52a499563ccf2a7c761cc498ad758d99c