Commit Graph

5085 Commits

Author SHA1 Message Date
Matthias Sohn 81ef0cd058 Exclude generated class UbcCheck from PMD checks
Silence the many duplicate code warnings for this generated class.

Change-Id: I3ecb0f986c809dad962b821c5de7cf18865642d3
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-09 17:07:21 -04:00
David Pursehouse 21fa8f6192 Merge branch 'stable-4.7'
* stable-4.7:
  Prepare 4.5.3-SNAPSHOT builds
  JGit v4.5.2.201704071617-r

Change-Id: Id52cd145a94919b43bc31274d28940c101790080
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-09 21:03:53 +09:00
David Pursehouse 52be84aea5 Merge branch 'stable-4.6' into stable-4.7
* stable-4.6:
  Prepare 4.5.3-SNAPSHOT builds
  JGit v4.5.2.201704071617-r

Change-Id: I5d2044c59af7bc2786fb66ebf5130e412884d74b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-09 20:03:33 +09:00
David Pursehouse c047e2ad2d Merge branch 'stable-4.5' into stable-4.6
* stable-4.5:
  Prepare 4.5.3-SNAPSHOT builds
  JGit v4.5.2.201704071617-r

Change-Id: I4e1915d3a88e15c9ef1fb2b470b7f3b821243ff5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-09 17:22:39 +09:00
Matthias Sohn 3db0f507ee Prepare 4.5.3-SNAPSHOT builds
Change-Id: I69681b7a5687ca76bd0dd5d3e7ce2cff841d0e32
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-08 00:31:09 +02:00
Matthias Sohn c1d3ecbeab JGit v4.5.2.201704071617-r
Change-Id: I66402643d7c84c90bf5cefed4d2ec3aa68c94cfb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-07 22:17:27 +02:00
Matthias Sohn 7adacbd19a Silence API error for new method added to abstract MergeStrategy
OSGi semantic versioning rules allow to break implementors of an API in
a minor version.

Change-Id: I4ada3e6455e8e8e1bb8fb71affa0a1b36bd46fc4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-06 18:17:22 +02:00
Matthias Sohn 4e8655c74d Fix @since tags of new API added after 4.7.0
Change-Id: I356f71cdef8e23a9b06cf0a4079060a116b9ed27
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-06 18:16:04 +02:00
David Pursehouse e48dd364f8 Merge branch 'stable-4.7'
* stable-4.7:
  PushConnectionTest: Increase maxCommandBytes again

Change-Id: Idbbc48964166ef80d578dde1b68e1ade892f00dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-06 13:28:20 +09:00
David Pursehouse 661232b1e9 PushConnectionTest: Increase maxCommandBytes again
It was already increased in 61a943e, but that was still not enough to
take into account the length of snapshot versions.

Change-Id: Ib54cec97e97042fe274b87a3a1afa9bb06c8bf19
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-06 11:45:02 +09:00
David Pursehouse c4e952109f Merge branch 'stable-4.7'
* stable-4.7:
  Prepare 4.7.1-SNAPSHOT
  JGit v4.7.0.201704051617-r

Change-Id: I1e27e9875f7a8ed68fdde79640d0fd9a7205faca
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-06 10:10:22 +09:00
Zhen Chen f5368dc97f Only throw MissingObjectException when necessary
When preparing the bitmap, the flag ignoreMissingStart only applied to
the start object. However, sometime the start object is present but some
related objects are not present during the walk, we should only release
the MissingObjectException when the ignoreMissingStart is set false.

Change-Id: I1097a2defa4a9dcf502ca8baca5d32880378818f
Signed-off-by: Zhen Chen <czhen@google.com>
2017-04-05 19:09:16 -04:00
Matthias Sohn 6a311a071f Prepare 4.7.1-SNAPSHOT
Change-Id: I16a45035258276217446bccc0ad1b0991383aa0c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-06 00:16:53 +02:00
Dave Borowitz 4c3e274588 Support creating Mergers without a Repository
All that's really required to run a merge operation is a single
ObjectInserter, from which we can construct a RevWalk, plus a Config
that declares a diff algorithm. Provide some factory methods that don't
take Repository.

Change-Id: Ib884dce2528424b5bcbbbbfc043baec1886b9bbd
2017-04-05 17:50:54 -04:00
Matthias Sohn 9f4c10784b JGit v4.7.0.201704051617-r
Change-Id: Ic2bd6aca0b7a7e0597ffc1f7cf647b49878f9950
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-05 22:17:44 +02:00
Matthias Sohn aec22e74cf Prepare 4.8.0-SNAPSHOT builds
Change-Id: Ifea6750e79d417a8a2a891b3b5f96d68c7200011
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-05 14:49:49 +02:00
Matthias Sohn 4cfaef4c20 Fix version.sh to update version of imported jgit features
Change-Id: I9f29e84b4d357ac8910b8dc534ea91dc9be96079
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-05 14:48:00 +02:00
Andrey Loskutov ace9e4305a Merge "Fixed NP dereference error reported by ecj in UploadPack.stopBuffering()" 2017-04-05 07:53:26 -04:00
David Pursehouse db8b2c4288 Merge branch 'stable-4.7'
* stable-4.7:
  TarFormat: Use commit time as timestamp for entries

Change-Id: I24e2ad725a32b9b06af4dcac59454c08bd528387
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-05 17:22:16 +09:00
Andrey Loskutov 7476baebfc Fixed NP dereference error reported by ecj in UploadPack.stopBuffering()
Introduced via commit 3b2508b514.

Change-Id: I2b6175c095aea2868a8c302103095accde5170e3
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2017-04-05 09:51:12 +02:00
Shawn Pearce db2493e7d8 Merge "Make diff locations more consistent" 2017-04-04 22:26:38 -04:00
Yasuhiro Takagi b26102469c TarFormat: Use commit time as timestamp for entries
This was already done for ZipFormat in 1448ec3.

Change-Id: Ie131938a3f640c68718dc793d18dd35be5c71e7c
Signed-off-by: Yasuhiro Takagi <ytakagi@bea.hi-ho.ne.jp>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-05 10:01:45 +09:00
David Pursehouse cab9dee333 Merge branch 'stable-4.7'
* stable-4.7:
  PushConnectionTest#limitCommandBytes: Increase maxCommandBytes

Change-Id: I354f46475ee96eb3b31abd303b5df2f3023fcf75
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-05 07:58:34 +09:00
Dave Borowitz edb6593ef0 ResolveMergerTest: Add tests for content merges
Change-Id: I2b85cc239e9b3090426c956cbf9af3deb4106a41
2017-04-04 17:27:15 -04:00
Dave Borowitz e4672d1c16 NameConflictTreeWalk: Mark repo param @Nullable
This is passed directly to the super constructor, where it is also
@Nullable. Marking it here saves the reader a jump.

Change-Id: Icc8db2f2dc6aae6e591aa4f09a3c283336a5424c
2017-04-04 14:53:17 -04:00
Jonathan Nieder db58abbbe8 Merge "Buffer the response until request parsing has done" 2017-04-04 14:25:41 -04:00
Masaya Suzuki 3b2508b514 Buffer the response until request parsing has done
This is a continuation from https://git.eclipse.org/r/#/c/4716/. For a
non-bidirectional request, we need to consume the request before writing
any response. In UploadPack, we write "shallow"/"unshallow" responses
before parsing "have" lines. This has happened not to be a problem most
of the time in the smart HTTP protocol because the underlying
InputStream has a 32 KiB buffer in SmartOutputStream.

Change-Id: I7c61659e7c4e8bd49a8b17e2fe9be67bb32933d3
Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
2017-04-04 10:52:49 -07:00
David Pursehouse 61a943e03d PushConnectionTest#limitCommandBytes: Increase maxCommandBytes
A higher limit is required to account for proper JGit version number
being sent in the UserAgent.

The version string "4.7.0.201704031717-r" is 20 characters, however
the strings used during development are shorter:

- When running from mvn, "4.7.0.qualifier" is used; 15 characters
- When running in Eclipse, "unknown" is used; 7 characters

Change-Id: I9aca2f71389a42fedce305e9078db016869c3d1a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-04 21:37:48 +09:00
KB Sriram 4a985f5aa8 Make diff locations more consistent
DiffAlgorithms can return different edit locations for inserts or
deletes, if they can be "shifted" up or down repeating blocks of
lines. This causes the 3-way merge to apply both edits, resulting in
incorrectly removing or duplicating lines.

Augment an existing "tidy-up" stage in DiffAlgorithm to move all
shiftable edits (not just the last INSERT edit) to a consistent
location, and add test cases for previously incorrect merges.

Bug: 514095
Change-Id: I5fe150a2fc04e1cdb012d22609d86df16dfb0b7e
Signed-off-by: KB Sriram <kbsriram@google.com>
2017-04-03 16:45:13 -07:00
David Pursehouse 61e336475d Downgrade Jetty to 9.3.17.v20170317 in Bazel build
Jetty was downgraded on stable-4.6 which doesn't have a Bazel
build.

Change-Id: Ibeb91436169e852a4241189f80e4895b54ce3cd0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-04-03 08:33:33 +09:00
Matthias Sohn 6d5d3e4584 Merge branch 'stable-4.6'
* stable-4.6:
  Update Jetty to 9.3.17.v20170317
  Revert "Update Jetty to 9.4.1.v20170120 in buck build"
  Revert "Update Jetty to 9.4.1.v20170120"

Change-Id: I9193b568cce9c72da899a8f3eaaf833956438e13
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-02 15:45:00 +02:00
Matthias Sohn 1b45b06116 Update Jetty to 9.3.17.v20170317
Update to the latest 9.3 version until we have a solution for bug 514336
we face with 9.4.x versions.

Change-Id: I6d8d476abe8677ce865a08099bb77330effc700a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-04-02 11:53:29 +02:00
Matthias Sohn ebc290a4a0 Revert "Update Jetty to 9.4.1.v20170120 in buck build"
This reverts commit d3b80b951c.

Change-Id: I596ba596f3e857346020e01b0a018d90a0b27edd
2017-04-01 13:03:48 +02:00
David Pursehouse da6fa14fd1 Revert "Update Jetty to 9.4.1.v20170120"
This reverts commit e05caf91f1.

Change-Id: Ia4287f130034a790759b5035505a093b4616a05a
2017-03-31 14:50:20 +09:00
Matthias Sohn b65a764b6b Remove unused import from ManifestParser
Change-Id: Ie60ef9c7bc6ce0fdf017949ebfb9a21753e70506
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-31 00:38:36 +02:00
Matthias Sohn 94accd719a Downgrade jetty to 9.3.9.v20160517
This works around the problems we faced with jetty 9.4.3.v20170317.

Bug: 514336
Change-Id: I7e9dd539414624d71587c55cb436b843949aa296
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-31 00:36:58 +02:00
Matthias Sohn 7395c7af59 Require jetty 9.4.0 consistently
Change-Id: If9de4c0e43850dec46858bd58e9692a7e099cbc3
2017-03-30 13:56:16 +02:00
Han-Wen Nienhuys f32d65759c Document the intended use of RepoCommand#setURI()
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I4a59dd8278b7b0026094692127b7f55e89c10bae
2017-03-29 16:54:29 +02:00
Han-Wen Nienhuys 6e652846f6 Noop changes to ManifestParser
* Parse the base URL in ManifestParser construction.  This will signal
  errors earlier.

* Simplify stripping of trailing slashes.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I4a86f68c9d7737f71cf20352cfe26288fbd2b463
2017-03-29 13:51:37 +02:00
Han-Wen Nienhuys 27b05c7d71 Consistently use 'path' for the path to a subrepo in RepoCommand
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I79ea7eb7b4d319e0100e3121aca5ef82eb8ad92a
2017-03-27 17:36:56 -04:00
Matthias Sohn 251abbfcd1 Merge branch 'stable-4.6'
* stable-4.6:
  Only mark packfile invalid if exception signals permanent problem
  Don't flag a packfile invalid if opening existing file failed
  Prepare 4.5.2-SNAPSHOT builds

Change-Id: Ife4efad1135d3870a5a0fb71e60b9524fb8777ab
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-27 22:45:59 +02:00
David Pursehouse 7f013924a8 Merge branch 'stable-4.5' into stable-4.6
* stable-4.5:
  Only mark packfile invalid if exception signals permanent problem
  Don't flag a packfile invalid if opening existing file failed
  Prepare 4.5.2-SNAPSHOT builds

Change-Id: I20b50981adc54c426666015ff04fe3bb1db9abd9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-03-27 10:14:50 +09:00
Matthias Sohn aaf3c5154e Only mark packfile invalid if exception signals permanent problem
Add NoPackSignatureException and UnsupportedPackVersionException to
explicitly mark permanent unrecoverable problems with a pack 

Assume problem with a pack is permanent only if we are sure the
exception signals a non-transient problem we can't recover from:
- AccessDeniedException: we lack permissions
- CorruptObjectException: we detected corruption
- EOFException: file ended unexpectedly
- NoPackSignatureException: pack has no pack signature
- NoSuchFileException: file has gone missing
- PackMismatchException: pack no longer matches its index
- UnpackException: unpacking failed
- UnsupportedPackIndexVersionException: unsupported pack index version
- UnsupportedPackVersionException: unsupported pack version

Do not attempt to handle Errors since they are thrown for serious
problems applications should not try to recover from.

Change-Id: I2c416ce2b0e23255c4fb03a3f9a0ee237f7a484a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-26 11:40:47 +02:00
Matthias Sohn 3104629e31 Raise minimum version of o.e.jetty.security to 9.4.0
This is required since we now use AbstractLoginService which was
introduced in Jetty 9.4.0.

Change-Id: Iee6e4ae456123099f7a99cc53c5ae02fd43bfa46
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-25 23:34:24 +01:00
Luca Milanesio 363a3657b1 Don't flag a packfile invalid if opening existing file failed
A packfile random file open operation may fail with a
FileNotFoundException even if the file exists, possibly
for the temporary lack of resources.

Instead of managing the FileNotFoundException as any generic
IOException it is best to rethrow the exception but prevent
the packfile for being flagged as invalid until it is actually
opened and read successfully or unsuccessfully.

Bug: 514170
Change-Id: Ie37edba2df77052bceafc0b314fd1d487544bf35
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-25 01:33:18 +01:00
Matthias Sohn 11a12ceb0b Prepare 4.5.2-SNAPSHOT builds
Change-Id: I8485de1f3f63dc9ec445b8fb08093ca144aedc59
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-25 01:21:58 +01:00
David Pursehouse 471951928a Upgrade error_prone_core to 2.0.19
Change-Id: I019f6e8ce4b074697c2dfc6020b10dc003d0804d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-03-24 15:36:20 +09:00
David Pursehouse 5f902f07cc PullCommand: Add support for recursing into submodules
Add a new API method to set the recurse mode, and pass the mode into
the fetch command.

Extend the existing FetchCommandRecurseSubmodulesTest to also perform
the same tests for fetch. Rename the test class accordingly.

Change-Id: I12553af47774b4778f7011e1018bd575a7909bd0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-03-24 00:02:45 +01:00
David Ostrovsky fa2851ce78 bazel: Consume hamcrest through transitive dependency
In I3ab958ce8 explicit dependency in lib/BUILD were defined and most
of the bazel build implementation was switched to using it. Switch
test.bzl test implementation to using explicit dependencies as well.

Change-Id: I4413d1a45addeeb2a980d07669fa034c2eebb3a4
Signed-off-by: David Ostrovsky <david@ostrovsky.org>
2017-03-23 06:47:49 +01:00
Matthias Sohn 61f830d3a2 Explain in error message how to recover from lock failure
Bug: 483897
Change-Id: I70f8d9c82c1efe2928f072a2fb69461160f7c5f7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2017-03-22 18:17:01 -04:00