Commit Graph

7399 Commits

Author SHA1 Message Date
Matthias Sohn 84db92bb67 Update Eclipse SUA to latest 2.0 version
This should fix errors raised in
https://download.eclipse.org/oomph/archive/simrel/egit.aggrcon/

The original is maintained in
https://git.eclipse.org/r/plugins/gitiles/cbi/org.eclipse.license/+/refs/heads/master/org.eclipse.license

Change-Id: I09325f04f3ae13b2558b212ad73b3f4f624ecb8d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-24 12:16:13 +02:00
David Ostrovsky 9354d255eb Bump bazel version to 0.29.1
Change-Id: I55033c5f36bc2371763e385d7289e9ccf967c32e
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-23 09:23:24 +02:00
David Ostrovsky 5caa951515 Bazel: Reuse version from .bazelversion for minimum used version check
Bazel is still supported in addition to the Bazel wrapper Bazelisk,
that is recommended, as it would automatically switch to the right
Bazel version on stable branches (like it was the case with Buck).

That why minimum used Bazel version check is still needed in WORKSPACE
file in addition to the .bazelversion used by Bazelisk. That means that
currently, bazel version is maintained in two places:

* .bazelversion
* WORKSPACE

This change introduces the repository rule to read the bazel version
from the .bazelversion file and perform the minimum version check.

Change-Id: Ib9c1382935ded7bcd322ed0122838c40ba2faa6c
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2019-09-23 09:23:21 +02:00
Han-Wen Nienhuys d75a6b5d81 dfs: rename ReftableStack to DfsReftableStack
The functionality in ReftableStack is specific to DFS.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: If6003d104b1ecb0f3ca7e9c3815b233fa0abf077
2019-09-19 18:32:20 +02:00
Han-Wen Nienhuys 33dc08c162 reftable: add maxUpdateIndex to Reftable
This makes maxUpdateIndex() available in MergedReftable, so we can
know generically at which index to create the next reftable in a
stack.

Change-Id: Ia2314bc57c8b5dd7e69d5e61096fdce1d35abd11
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-09-19 18:32:20 +02:00
David Pursehouse a793be2111 Upgrade ecj plugin to 3.19.0
Change-Id: I36854a4e27ad3b0fc6c2ac145d78df582bca3988
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-19 21:43:18 +09:00
Ivan Frade 83a6145f2f UploadPackReachabilityTest: Use assertThrows instead of thrown
In https://git.eclipse.org/r/c/144009/ UploadPack tests moved from
thrown to assertThrows, but newly introduced tests are still using
the thrown.

Update test so all of them use assertThrows.

Change-Id: I0ff19a6f8ba9e978d8ffc7a912c0572d9f00c7fa
Signed-off-by: Ivan Frade <ifrade@google.com>
2019-09-18 14:43:28 -07:00
Ivan Frade 208ddab5ab RequestValidatorTestCase: Tests for the request validators
Make a general test with all the cases, like request
advertised/unadvertised tips, reachable/unreachable from those tips,
commits/blobs.

Implement specific validator tests as subclasses. Each test provides the
validator instance and tells what cases are valid.

Change-Id: I7f961fcc05f7fabbeae1ba8ff73d99072ce8fc72
Signed-off-by: Ivan Frade <ifrade@google.com>
2019-09-18 13:54:50 -07:00
Ivan Frade 7c471afe1c UploadPackTest: Move "reachability" tests to its own file
UploadPackTest is already too long and it is covering too many aspects
of UploadPack. This makes difficult to see what is tests and if all
cases are covered.

Move the reachability-related tests to its own file. This moves also an
auxiliary function, reducing the length of UploadPack. Complete also the
coverage, adding combinations of bitmap availability/commits or
blobs/reachable or not.

Change-Id: Id5cfc9d0118d997da30e3886c91db996a86250fc
Signed-off-by: Ivan Frade <ifrade@google.com>
2019-09-18 13:54:50 -07:00
Matthias Sohn 7be05205dd Merge branch 'stable-5.5'
* stable-5.5:
  WorkingTreeIterator: handle different timestamp resolutions

Change-Id: I61df7392d8826ab526c39da2a8718723a1cc602a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-17 00:42:32 +02:00
Matthias Sohn 37c8b35344 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  WorkingTreeIterator: handle different timestamp resolutions

Change-Id: I83384336e0d766237d0579152673c9eefc9edd65
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-17 00:41:35 +02:00
Matthias Sohn 35339b455e Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  WorkingTreeIterator: handle different timestamp resolutions

Change-Id: I87afe29578b0270c79bc54c4e2cfda579c329237
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-17 00:40:50 +02:00
Matthias Sohn 84022ac9de Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  WorkingTreeIterator: handle different timestamp resolutions

Change-Id: Ia2a38949089a66abb5f4f1cd41717d2ae8d0eb5b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-17 00:39:54 +02:00
Matthias Sohn 831ba0a628 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  WorkingTreeIterator: handle different timestamp resolutions

Change-Id: Ic33ebec963af03a182dfe8f46486f5e8d00c0694
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-17 00:38:32 +02:00
Thomas Wolf e3f535cb15 WorkingTreeIterator: handle different timestamp resolutions
Older JGit stored only milliseconds timestamps in the index. Newer
JGit may get finer timestamps from the file system. This leads to
slow index diffs when a new JGit runs against an index produced
by older JGit because many timestamps will differ and JGit will
then do many content checks. See [1].

Handle this migration case by only comparing milliseconds if the
index entry has only millisecond precision.

The inverse may also occur; also compare only milliseconds if the
file timestamp has only millisecond precision.

Do the same also for microsecond resolution. On Windows, NTFS may
provide 100ns resolution and may be used by external programs writing
the index, but Java's WindowsFileAttributes may provide only
microseconds.

File timestamp precision in Java depends not only on the Java APIs
used by different JGit versions but may also change when running the
same Java code on different VMs. And of course the resolution may
vary among operating and file systems. Moreover, timestamp precision
in the index depends on the program that wrote the index. Canonical
git may use a different resolution, maybe even different between git
versions.

[1] https://www.eclipse.org/forums/index.php/t/1100344/

Change-Id: Idfd08606c883cb98787b2138f9baf0cc89a57b56
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-17 00:36:22 +02:00
David Pursehouse 687044beb0 Upgrade eclipse-jarsigner-plugin to 1.1.7
Change-Id: I1ed3a3a09b63eece30bba90b76579797aa4f589d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-13 17:03:31 +09:00
David Pursehouse 9e5d72340a Require Maven version 3.6.2
Change-Id: I3acfe4be7a427eff0eb057a2e22253030bb0e910
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-13 17:03:23 +09:00
Thomas Wolf 2e75fe6be1 Remove an old work-around for core.autocrlf = input
The removed code was trying to avoid mistakenly reporting differences
when core.autocrlf was set to "input" but a file had already been
committed with CR-LF. It did that by running the blob from the cache
through a CRLF-to-LF filter because older JGit would also run the file
from the working tree through such a filter.

The real fix for this case was done in commit 60cf85a. Since then files
are not normalized if they have already been committed with CR-LF and
this old fix attempt from bug 372834 is no longer needed.

Change-Id: Ib4facc153d81325cb48b4ee956a596b423f36241
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-09-12 12:02:11 +02:00
David Pursehouse 0bfba11186 Merge "Merge branch 'stable-5.5'" 2019-09-11 20:53:12 -04:00
Matthias Sohn 5c29fdd23c Merge branch 'stable-5.5'
* stable-5.5:
  Prepare 5.5.1-SNAPSHOT builds
  JGit v5.5.0.201909110433-r
  Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL

Change-Id: I113ce255739786623f7e101dc293b9a769abeff0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-11 22:19:16 +02:00
Han-Wen Nienhuys c78fbf23a5 dfs: use ReftableConfig() constructor in DfsReftableDatabase
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I756f086fccaba8e77db516160c14708f97519f93
2019-09-11 13:01:56 +02:00
Han-Wen Nienhuys 434e6c732a dfs: use RefDatabase API for exactRef in ReftableBatchRefUpdate
This removes one use of DFS specific code in this class.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I3ef6a4b98357cc6dc480892244ddc51d2fd751a2
2019-09-11 13:01:56 +02:00
Han-Wen Nienhuys 5c390cf9de reftable: add OutputStream argument to ReftableWriter constructor
This lets us write reftables generically with functions that take
just ReftableWriter argument

Change-Id: I7285951f62f9bd4c78e8f0de194c077d51fa4e51
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-09-11 13:01:56 +02:00
Han-Wen Nienhuys 90efbd216f reftable: read file footer in ReftableReader#allRefs
allRefs determined the end of the ref block without accounting for
index or log blocks. This could cause other blocks to be interpreted
as ref blocks, leading to "invalid block" error messages.

Change-Id: I7b9323e7d5e0e7d64535b3ec1efd576aed1e9870
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-09-11 13:01:56 +02:00
Han-Wen Nienhuys 726bcc4fdb reftable: add ReftableReflogReader
Change-Id: Iac2c4ac5e3aad0fa37157ed8866f1987d80268d6
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
2019-09-11 12:59:55 +02:00
Matthias Sohn 7f262b8745 Prepare 5.5.1-SNAPSHOT builds
Change-Id: Iaf929168770dfef54ce2a7bfcbee9b87c450ca8a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-11 11:46:58 +02:00
Matthias Sohn de2df8adde JGit v5.5.0.201909110433-r
Change-Id: I5715730ac47d32462f235c2f50581bf1579d46b9
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-11 10:31:38 +02:00
Matthias Sohn 524fd0d8c6 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL

Change-Id: Ibdda7687da015b17cdca67427202766fe102fee1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10 22:03:06 +02:00
Matthias Sohn 3c0230d844 Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL

Change-Id: Ie8447fc28b03bfc918cee0cc2162a2aa3585f3ea
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10 22:00:40 +02:00
Matthias Sohn 8f96e1bebb Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL

Change-Id: I57093dfef181645088767471159c204c50961c3a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10 21:26:40 +02:00
Matthias Sohn 718a8b11b3 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL

Change-Id: Ic4ee37fb36f61dc7707391f768bf78a33094bfd3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10 21:26:04 +02:00
Matthias Sohn 84ac86ee61 Fix WorkingTreeIterator.compareMetadata() for CheckStat.MINIMAL
If CheckStat is MINIMAL or timestamps have no nanosecond part
WorkingTreeIterator.compareMetaData only checks the second part of
timestamps and ignores nanoseconds which may have ended up in the index
by using native git.

If

fileLastModified.getEpochSecond() == cacheLastModified.getEpochSecond()

we currently proceed comparing fileLastModified and cacheLastModified
with full precision which is wrong since we determined that we detected
reduced timestamp resolution.

Fix this and also handle smudged index entries for CheckStat.MINIMAL.

Change-Id: I6149885903ac63d79b42d234cc02aa4e19578f3c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-10 16:08:45 +02:00
Matthias Sohn 830e214805 Merge branch 'stable-5.5'
* stable-5.5:
  bazel: fix running http tests
  Set parameter name in parameterized http tests
  Format BUILD files with buildifier
  Format BUILD files with buildifier
  [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache
  Bazel: Format BUILD files with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Fix warning about deprecated lib.bzl
  Format lib/BUILD with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Bazel: Bump skylib library version to 0.8.0
  Use bazelisk to switch between used bazel version
  Bazel: Require minimum bazel version 0.17.1
  Fix wrong placeholder index in error message packInaccessible
  JGitText: Remove unused externalized strings
  RepoText: Remove unused externalized string
  CLI: Remove unused externalized strings

Change-Id: Idb0848dd33a76328b24908dc86db335cca742a1c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:36:59 +02:00
Matthias Sohn b31d5360f0 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  Format BUILD files with buildifier
  Format BUILD files with buildifier
  [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache
  Bazel: Format BUILD files with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Fix warning about deprecated lib.bzl
  Format lib/BUILD with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Bazel: Bump skylib library version to 0.8.0
  Use bazelisk to switch between used bazel version
  Bazel: Require minimum bazel version 0.17.1
  Fix wrong placeholder index in error message packInaccessible
  JGitText: Remove unused externalized strings
  RepoText: Remove unused externalized string
  CLI: Remove unused externalized strings

Change-Id: Idf3abd80ad3b00188f655e638d9908228770911f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:35:14 +02:00
Matthias Sohn 83a07246c1 bazel: fix running http tests
Other than Maven bazel seems unable to cope with abstract
AllFactoriesHttpTestCase having no test methods, hence tag this class
with @Ignore.

Change-Id: I9dfe43f882ad073b284648e24844b51877d87776
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:34:14 +02:00
Matthias Sohn 74937d0328 Set parameter name in parameterized http tests
This shows the class name of the HTTP factory used in each test run.

Change-Id: I7c1df20f0e138dc7e3120fe87e80d40ab17dd8c8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:34:13 +02:00
Matthias Sohn 3cd6eec0da Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Format BUILD files with buildifier

Change-Id: Iaf15196f31ec839fed4211d099bed991b4e5e9de
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:11:01 +02:00
Matthias Sohn 5bac162a00 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Format BUILD files with buildifier

Change-Id: I9281a953a38dad0df7e5a2d6d7a11d4597513aa1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:10:12 +02:00
Matthias Sohn f8b06ddfc0 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Format BUILD files with buildifier

Change-Id: I5a8413470fd0fbb6db3ca553f455b3e3dc10ab33
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 17:08:56 +02:00
David Pursehouse f042270e65 Format BUILD files with buildifier
Using buildifier from master branch and the command:

$ buildifier -r -lint fix -warnings all .

Change-Id: I19c8ff183081093cb73bed7221a78a91b6cba4dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-08 22:30:19 +09:00
Matthias Sohn 80fd4cb075 Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Format BUILD files with buildifier
  [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache
  Bazel: Format BUILD files with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Fix warning about deprecated lib.bzl
  Format lib/BUILD with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Bazel: Bump skylib library version to 0.8.0
  Use bazelisk to switch between used bazel version
  Bazel: Require minimum bazel version 0.17.1
  Fix wrong placeholder index in error message packInaccessible
  JGitText: Remove unused externalized strings
  RepoText: Remove unused externalized string
  CLI: Remove unused externalized strings

Change-Id: Iaea77a89fcd821df5dbb24f5e3e39e6d1dfc0bd4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 15:05:19 +02:00
Matthias Sohn 22973d13ea Format BUILD files with buildifier
Using buildifier from master branch and the command:
$ buildifier -r -lint fix -warnings all .

Change-Id: I52a18c09a1f192e2141f4156f9c1aabbbdbc910a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 14:59:29 +02:00
Matthias Sohn 82badd0a87 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache
  Bazel: Format BUILD files with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Fix warning about deprecated lib.bzl
  Format lib/BUILD with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Bazel: Bump skylib library version to 0.8.0
  Use bazelisk to switch between used bazel version
  Bazel: Require minimum bazel version 0.17.1
  Fix wrong placeholder index in error message packInaccessible
  JGitText: Remove unused externalized strings
  RepoText: Remove unused externalized string
  CLI: Remove unused externalized strings

Change-Id: I0d8b7f79177a20dc00c89e2cf0005eb3d3039532
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 11:17:32 +02:00
Matthias Sohn d4752e2900 [error prone] Suppress NonAtomicVolatileUpdate in SimpleLruCache
We don't need to update time atomically since it's only used to order
cache entries in LRU order.

Change-Id: I756fa6d90b180c519bf52925f134763744f2c1f1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-08 10:37:54 +02:00
David Pursehouse 1fd09a19a2 Bazel: Format BUILD files with buildifier
Change-Id: I8b4abf67fba592be42b2b5b029fa0e972d746dcb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-08 10:09:07 +09:00
David Pursehouse 40ba12f3ac Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
Change-Id: Ifc47ae22209fdb7a5d7bede4da002640ed26a43a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-08 10:08:39 +09:00
Matthias Sohn 38198972d4 Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Bazel: Fix warning about deprecated lib.bzl
  Format lib/BUILD with buildifier
  Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
  Bazel: Bump minimum supported version to 0.29.0
  Bazel: Bump skylib library version to 0.8.0
  Use bazelisk to switch between used bazel version
  Bazel: Require minimum bazel version 0.17.1
  Fix wrong placeholder index in error message packInaccessible
  JGitText: Remove unused externalized strings
  RepoText: Remove unused externalized string
  CLI: Remove unused externalized strings

Change-Id: Iea37a8e39e9d4872dc607c9222dcf191ce4e4757
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-09-07 12:16:42 +02:00
David Pursehouse e626c55936 Bazel: Fix warning about deprecated lib.bzl
Change-Id: Ifdbaaf9ec020a621070eea351f791a819d554012
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07 15:36:11 +09:00
David Pursehouse 4678710c68 Format lib/BUILD with buildifier
Change-Id: I4f0ad64371b160b67797f49b9fde521e5dea9396
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07 15:36:11 +09:00
David Pursehouse 85cea8c583 Bazel: Add fixes for --incompatible_load_java_rules_from_bzl
Change-Id: I24746335db132bf20f400cb3db400737596d4542
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-09-07 15:36:11 +09:00