This is a snapshot build from jgit's stable-4.11 branch, and contains a
fixed version of ObjectIdSerializer [1] that supports serialization of
known non-null values.
[1] https://git.eclipse.org/r/#/c/119456/
Change-Id: I758be8a38e2aece932e145faf5e71867aa28713c
This is a snapshot built from the latest head of JGit's master
branch.
Also upgrade commons-compress to 1.15 and its dependency tukaani-xz
to 1.6 to align with the versions used in JGit since [1].
[1] https://git.eclipse.org/r/#/c/115360/
Change-Id: I0741572b029e565e61e7f85171bfc0d057c0b1cc
_JGIT_VERS should not be enclosed in quotes. This causes it to be
literally included in the doc URL, resulting in a javadoc error
when building the API:
javadoc: warning - Error fetching URL: http://download.eclipse.org/jgit/site/_JGIT_VERS/apidocs/
Change-Id: Ifce43c48755a5687d5b2807de4dcfb5d14566056
This is a custom build from master, including a merge of all the changes
I recently made to (JGit) stable-4.9. In particular, this change is
necessary so I0092f009 will compile when it is merged from (Gerrit)
stable-2.15 into master.
Change-Id: I3cf28f16cfdc72beea2938987be8130b97765591
This is a snapshot built from the head of jgit's master branch, and
includes all changes from the stable-4.9 branch including those that
were submitted after the 4.9.2.201712150930-r release.
Change-Id: Ie8bca213394ee24bc4e15e50488b083e31632952
This is a snapshot built from the latest head of jgit's master
branch, after the 4.9.1 release was tagged and merged in.
Change-Id: Id27986637e5959190815141c8b8ab0fd8848e37a
The _DOC_VERS variable should not be set to the same as _JGIT_VERS
when the latter is referencing a snapshot version. In this case the
generated Javadoc URL does not exist, causing a warning during the
api build, for example:
javadoc: warning - Error fetching URL: http://download.eclipse.org/jgit/site/4.8.0.201706111038-r.71-g45da0fc6f/apidocs/
Change-Id: I147b736316852a0a7d8b7ca3bc25f2c6f2bc2969
Now with atomic support for traditional on-disk repos, and finer-grained
control over reflogs.
RefUpdate.Result also grew some new error values, so extend existing
switch statements to cover them.
Change-Id: If685ed7f34d965e82cf11fcf59dd832394f2bb4a
Test fix was cherry-picked from fe494ed59ea1fb6258a13daf5c2bc250e56afde4
which was submitted on stable-2.14 when JGit was updated to
4.7.1.201706071930-r.
Change-Id: I16395936628d6f04668cc0adf9bd3eb6c7080394
This is a snapshot of the latest head of JGit's master branch.
Jetty was changed to version 9.3.17.v20170317. This version change
will be done for Gerrit in a follow-up commit.
Change-Id: I19ca866f90b16260f72fdd9cdc97683031b48488
This snapshot includes numerous changes since the previous one.
There is currently nothing that we specifically need in this snapshot,
but it brings us closer to what will be in the upcoming 4.7.0 release
and will allow us to potentially catch any issues before release.
Change-Id: I4c3642eab4c1f1128e2e19cf656dee13270662e2
Put all the logic in jgit.bzl, where a single edit suffices to get
the local flavor.
Given that all sha1 for jgit dependencies are in jgit.bzl, we can
remove the constants and use sha1 values directly.
Change-Id: Icabf651e02f226e5c025457d54588074a11ae283
Now that Bazel build for JGit is fully implemented, we can document
the process of routing the JGit dependency to the development tree
instead of consuming it from Central or ~/.m2 local repository:
1. Activate local jgit repository in WORKSPACE file:
local_repository(
name = "jgit",
path = "/home/<user>/projects/jgit",
)
2. Uncomment alias to jgit repository in lib/jgit/**/BUILD files.
It shouldn't be needed and is tracked under this issue upstream: [1]:
alias(
name = "jgit-alias",
actual = select({
"@//lib:jgit-dev": "@jgit//org.eclipse.jgit:jgit",
"//conditions:default": "@jgit_lib//jar",
}),
visibility = ["//visibility:public"],
)
Test plan:
Update local JGit tree, run tests and verify that local JGit tree
modifications are relfected in gerrit build:
$ bazel build --define jgit-dev=1 headless
To consume JGit from Central, do not pass jgit-dev=1:
$ bazel test ...
[1] https://github.com/bazelbuild/bazel/issues/2707
Change-Id: I1b0fee7df802f6cbd54acbb0bc73157e2b8bc7cf
Move the definitions of the JGit repository and the artifact hashes into
the lib/jgit/jgit.bzl file so that when we change the JGit version we can
make all the necessary modifications in one place.
Change-Id: I4cb97481d62a57bfca960392d696aae3c95c6bb7
This snapshot includes several fixes since the release, including some
improvements in LFS support:
d3148f300 Make ObjectDownloadListener public
55c629a9f LfsProtocolServlet#LfsRequest: Add operation type helper methods
56fe21778 Expose LFS operation strings as public constants
590141163 LfsProtocolServlet: Improve error on getLargeFileRepository failure
7245aa031 Add support for refusing LFS request due to invalid authorization
0e187f148 Add LfsPointerFilter TreeFilter
Change-Id: Ib3cd9d8677b6c6017becc5c46e7fa4dfc5192807
Change-Id: Ibd58603e6c1975c883dbf9f1d115e03a25467774
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Signed-off-by: David Pursehouse <dpursehouse@collab.net>
Reformat the Bazel build files with the buildifier tool [1].
The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.
[1] https://github.com/bazelbuild/buildifier
Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
JavaEWAH was upgraded in JGit in [1], which is included in the snapshot
build of JGit being used in Gerrit since change Ic7c646b32.
Upgrade to use the same version.
[1] https://git.eclipse.org/r/#/c/77604/
Change-Id: I5de4cdbdf816296d97640bb83130544ec85685af
Adds support for MonotonicClock, which Gerrit can use
inside of ReviewDb and NoteDb to maintain timestamps.
Change-Id: Ic7c646b32644c1d1b1e93eeb50a3bf153e85d3c3
Includes {get,set}GitwebDescription on Repository,
which can replace methods in GitRepositoryManager.
Change-Id: Ie25a49864c770e1cfb065dfc9e7c1e8faa97b03c
Fixes the error:
Unable to load package for '//lib/jgit:jgit.bzl':
BUILD file not found on package path.
Change-Id: Ic3506f8777fc1875f00e295bd1775c774b56ef19
This snapshot includes the following changes since the previous:
abeaafc Don't log error if system git config does not exist
c711361 Add missing dependency to slf4j-log4j bridge
a4508f9 Rename FSJava7Test to FSTest
5a4dcce Improve JavaDoc for LfsProtocolServlet.getLargeFileRepository
The plan is to release Gerrit 2.13 with JGit 4.5 so this upgrade is to
release 2.13-rc1 with a JGit version that is closer to what will be JGit
4.5.
Change-Id: I75cf16a19abc5401f75be64efe72aa6013bd53b9
This snapshot includes the following changes since the previous:
b67df51 CLI: implement option -d for deleting tags
34673f0 Added a clean command.
d52bf2e Add specific exception for LFS unavailable
ac85672 Add Javadoc for LFS exception messages
3100662 ReceivePack: integrate push option parsing into recvCommands
2fd4559 ReceivePack: simplify getPushOptions
8e00a31 ReceivePack: allow push options to be set
Change-Id: I266d9663e32bd854a55c14ef8f7c2b427bf2c842
This snapshot includes the following commits since the previous:
dd2a5a7 Make GC.RepoStatistics static
c2e2326 ReceivePack: refactor push option parsing
36cf4fe Fix push option initalization on HTTP
9ae7d49 DfsReader: check object type during open
1227165 Clarify the semantics of DfsRefDatabase#compareAndPut
649ad06 NoteMapTest: Add missing @Test annotations
2d4d644 Add a RepeatRule to help repeating flaky tests
3e27fb3 Do not fake a SymbolicRef as an ObjectIdRef
ffbe03a LfsProtocolServlet: Add support for insufficient storage error
9974f30 Packet logging for JGit
609de52 push: Do not use push options unless requested
20d3f83 Fix HttpClientConnection leaking temporary buffer files
edd8ad4 Use FS#lastModified instead of File#lastModified
da9eef8 Don't check lastModified, length on folders for submodules
b8260b5 Added Java 7 launch config with LANG env. variable set
c4e209b Add HTTP status code to ServiceMayNotContinueException
Change-Id: Ieb219e82899ec606f4ef90317883c09bb8a0133d
This snapshot includes the following commits since the previous:
1096652 LfsProtocolServlet: Add support for rate limit and bandwidth limit errors
de89b7d LfsProtocolServlet: Always include message in error response
0a86b03 LfsRepository{NotFound,ReadOnly}: Externalize message strings
2fc1ceb DownloadTest: Use enums from org.apache.http.HttpStatus
108bee1 Ignore IOException thrown from close
f15e9c0 DfsObjDatabase: clear PackList dirty bit if no new packs
13f0db2 Enhance ResetCommand to allow disabling reflog update
Change-Id: I6590a62f3e1d839a8d36a4b933771d195cbe7650
This snapshot inludes the following fixes since the previous:
- LfsProtocolServlet: Always set the Content-Type header on response
- LfsProtocolServlet: Don't set pretty printing on Gson
- BaseReceivePack: null and IllegalStateException cases for getPushOptions
Change-Id: I7115335bf342df11fd6376d887d13f8e7aa7d91f
This snapshot includes the following changes in LfsProtocolServlet
that are needed by the LFS plugin:
- Allow getLargeFileRepository to raise exceptions
- Allow access to objects in request
- Reuse existing Writer when sending error response
Change-Id: Ic1bba1d7387b1f5a9d6121e750208a9d2a1dae2f
This snapshot includes the following improvements related to LFS:
- Include error message in response body
- Pass request and path to getLargeFileRepository
- Return HTTP 422 instead of 400
and the following other changes that are needed in Gerrit:
- RefSpec: allow construction of weird wildcarded RefSpecs
- RefSpec: reject refs ending in '/'
- BatchRefUpdate: Include command message in toString()
- DiffFormatter: Support setting a reader without a repo
Change-Id: I42eb72603c47e05cf39079164653defa96cf37c4
To run the tests:
bazel test //...
To build the Gerrit plugin API, run:
bazel build gerrit-plugin-api:plugin-api_deploy.jar
To build the Gerrit extension API, run:
bazel build gerrit-extension-api:extension-api_deploy.jar
TODOs:
Licenses
Reduce visibility (all public for now)
Generate HTML Documentation
Core plugins
gerrit_plugin() rule to build plugins in tree and standalone modes
GWT UI (only gwt_module() skylark rule is provided, no gwt_binary())
PolyGerrit UI
WAR
Publish artifacts to Maven Central
Ask Bazel team to add Gerrit to their CI on ci.bazel.io
Contributed-By: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I9a86e670882a44a5c966579cdeb8ed79b1590de3