]> source.dussan.org Git - jgit.git/log
jgit.git
7 years agoDefer object collision check until pack stream is done 40/98740/4
Zhen Chen [Thu, 8 Jun 2017 23:55:26 +0000 (16:55 -0700)]
Defer object collision check until pack stream is done

Object collision check requires read from local storage which may be
slow. We already delay this check for blobs, this change will also delay
other objects until the pack stream is closed. In this way, there is no
readCurs call until the pack stream is closed.

Change-Id: I3c8c4720dd19a5f64f8c7ddf07d815ed6877b6aa
Signed-off-by: Zhen Chen <czhen@google.com>
7 years agofetch: Accept any SHA-1 on lhs of refspec 03/98603/1
Shawn Pearce [Sun, 4 Jun 2017 20:58:16 +0000 (13:58 -0700)]
fetch: Accept any SHA-1 on lhs of refspec

Allow fetch to accept a SHA-1 on the left hand side of a RefSpec,
enabling callers to pass a specific SHA-1 they want that may not have
been advertised by the remote repository. This can be passed along to
the network protocol to be sent in a "want" line.

Rest of the plumbing only cares about the ObjectId of the Ref in
the askFor map, so make up a fake name using ObjectId.name() to
pass the desired ObjectId into the network code.

Change-Id: I620a189f3de005c403aa68b7d0442d6aa94e6056

7 years agoPrepare 4.9.0-SNAPSHOT builds 07/98207/1
Matthias Sohn [Tue, 30 May 2017 11:42:07 +0000 (13:42 +0200)]
Prepare 4.9.0-SNAPSHOT builds

Change-Id: I52a4153d573799e861ab104939f51fac1aceb9ee
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoFix out-of-bounds exception in RepoCommand#relative 80/97680/3
Han-Wen Nienhuys [Mon, 22 May 2017 12:48:39 +0000 (14:48 +0200)]
Fix out-of-bounds exception in RepoCommand#relative

Change-Id: I9c91aa2ff037bff27a8131fba54be22f5f27d80d
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoFix null return from FS.readPipe when command fails to launch 09/97709/3
Bryan Donlan [Mon, 22 May 2017 18:37:14 +0000 (11:37 -0700)]
Fix null return from FS.readPipe when command fails to launch

When a command invoked from readPipe fails to launch (i.e. the exec call
fails due to a missing command executable), Process.start() throws,
which gets caught by the generic IOException handler, resulting in a
null return. This change detects this case and rethrows a
CommandFailedException instead.

Additionally, this change uses /bin/sh instead of bash for its posix
command failure test, to accomodate building in environments where bash
is unavailable.

Change-Id: Ifae51e457e5718be610c0a0914b18fe35ea7b008
Signed-off-by: Bryan Donlan <bdonlan@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoRenameDetector: Clarify rename limits <= 0 78/97878/1
Dave Borowitz [Wed, 24 May 2017 13:26:40 +0000 (09:26 -0400)]
RenameDetector: Clarify rename limits <= 0

Change-Id: I8da386e02272316b8e5e5c2f31ce10ad98bcdb28

7 years agoRemove unnecessary cast for DfsReader 04/97704/1
Zhen Chen [Mon, 22 May 2017 17:26:27 +0000 (10:26 -0700)]
Remove unnecessary cast for DfsReader

Change-Id: I22aaccfc9d589750f9d1d711b655dd0fd543fa57
Signed-off-by: Zhen Chen <czhen@google.com>
7 years agoMerge "Fix javadoc of TooLargeObjectInPackException"
David Pursehouse [Mon, 22 May 2017 05:12:10 +0000 (01:12 -0400)]
Merge "Fix javadoc of TooLargeObjectInPackException"

7 years agoAllow DfsReader to be subclassed 08/97608/1
Shawn Pearce [Fri, 19 May 2017 20:47:10 +0000 (13:47 -0700)]
Allow DfsReader to be subclassed

Necessary if a DFS implementation wants to override close()
to record DfsReaderIoStats.

Change-Id: I144575f9bf1abf2c1fd72030550c4f0795fcf44d

7 years agoTrack read IO for DfsReader 03/97603/1
Shawn Pearce [Fri, 19 May 2017 19:23:02 +0000 (12:23 -0700)]
Track read IO for DfsReader

Compute how much disk IO a DfsReader is performing, and how long the
sum of those operations took on this reader instance. Implementations
of DFS and interested applications can get the stats by calling the
new DfsReader.getIoStats() method at or after close().

Change-Id: If585741301f29182617933d6406d4a70497f2ca7

7 years agoFix javadoc of TooLargeObjectInPackException 43/97543/1
Matthias Sohn [Fri, 19 May 2017 09:22:05 +0000 (11:22 +0200)]
Fix javadoc of TooLargeObjectInPackException

The API exception should have the same javadoc like the internal
exception org.eclipse.jgit.errors.TooLargeObjectInPackException

Change-Id: Ia7508c77609e53c8e808412ac523a93194648e49
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoMerge "Exclude refs/tags from bitmap commit selection"
Terry Parker [Thu, 18 May 2017 22:35:40 +0000 (18:35 -0400)]
Merge "Exclude refs/tags from bitmap commit selection"

7 years agoExclude refs/tags from bitmap commit selection 04/97404/7
Terry Parker [Thu, 18 May 2017 08:30:14 +0000 (01:30 -0700)]
Exclude refs/tags from bitmap commit selection

Commit db77610 ensured that all refs/tags commits are added to the
primary GC pack. It did that by adding all of the refs/tags commits
to the primary GC pack PackWriter's "interesting" object set.

Unfortunately, all commit objects in the "interesting" set are
selected as commits for which bitmap indices will be built. In a
repository like chromium with lots of tags, this changed the number of
bitmaps created from <700 to >10000. That puts huge memory pressure on
the GC task.

This change restores the original behavior of ignoring tags when
selecting commits for bitmaps.

In the "uninteresting" set, commits for refs/heads and refs/tags for
unannotated tags can not be differentiated. We instead identify
refs/tags commits by passing their ObjectIds as a new "noBitmaps"
parameter to the PackWriter.preparePack() methods.
PackWriterBitmapPreparer.setupTipCommitBitmaps() can then use that
"noBitmaps" parameter to exclude those commits.

Change-Id: Icd287c6b04fc1e48de773033fe432a9b0e904ac5
Signed-off-by: Terry Parker <tparker@google.com>
7 years agoMerge branch 'stable-4.8' 85/97485/1
Matthias Sohn [Thu, 18 May 2017 17:06:34 +0000 (19:06 +0200)]
Merge branch 'stable-4.8'

* stable-4.8:
  Prepare 4.8.0-SNAPSHOT builds
  JGit v4.8.0.201705170830-rc1

Change-Id: I001bac19abae58f8d634ba1bf2df1e0067154955
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoPrepare 4.8.0-SNAPSHOT builds 45/97345/1
Matthias Sohn [Wed, 17 May 2017 14:45:21 +0000 (16:45 +0200)]
Prepare 4.8.0-SNAPSHOT builds

Change-Id: I27fc4e4969fafde0fcba26aeebe30d732770b68f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoJGit v4.8.0.201705170830-rc1 21/97321/1 v4.8.0.201705170830-rc1
Matthias Sohn [Wed, 17 May 2017 12:26:54 +0000 (14:26 +0200)]
JGit v4.8.0.201705170830-rc1

Change-Id: I60c0a40f2e38748641b25a25bcf10346e2950886
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years ago[findBugs] Use UTF-8 to write to the error stream in TextProgressMonitor 24/97024/3
Matthias Sohn [Sat, 13 May 2017 16:58:21 +0000 (18:58 +0200)]
[findBugs] Use UTF-8 to write to the error stream in TextProgressMonitor

Change-Id: Ic85db2043d6f673f268bf781917daad45d28f8cd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years ago[findBugs] Use UTF-8 to read git-rebase-todo file 23/97023/3
Matthias Sohn [Sat, 13 May 2017 16:56:03 +0000 (18:56 +0200)]
[findBugs] Use UTF-8 to read git-rebase-todo file

Change-Id: I7c6f71e13ef106678157eae1aa3f9d39712e577b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years ago[findBugs] Use UTF-8 when writing to the error stream in GitHook 22/97022/3
Matthias Sohn [Sat, 13 May 2017 16:43:37 +0000 (18:43 +0200)]
[findBugs] Use UTF-8 when writing to the error stream in GitHook

Change-Id: Ica8a40b909ed45cf8e538714e4f26b64ff9a3d21
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years ago[findBugs] Use UTF-8 when writing to the error stream in jgit pgm 21/97021/2
Matthias Sohn [Sat, 13 May 2017 16:01:18 +0000 (18:01 +0200)]
[findBugs] Use UTF-8 when writing to the error stream in jgit pgm

Change-Id: Ic2555ea932dbbd1a3a6868e731f247b9754d7f09
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoAdd shutdown hook to cleanup unfinished clone when JVM is killed 83/96783/5
Matthias Sohn [Wed, 10 May 2017 22:18:40 +0000 (00:18 +0200)]
Add shutdown hook to cleanup unfinished clone when JVM is killed

Bug: 516303
Change-Id: I5181b0e8096af3537296848ac7dd74dff0b6d279
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoClean up the disk when cloning fails 65/96565/3
Thomas Wolf [Mon, 8 May 2017 06:48:40 +0000 (08:48 +0200)]
Clean up the disk when cloning fails

CloneCommand.call() has three stages: preparation, then the actual
clone (init/fetch), and finally maybe checking out the working
directory.

Restructure such that if we fail or are cancelled during the actual
clone (middle phase), we do clean up the disk again. This prevents
leaving behind a partial clone in an inconsistent state: either we
have a fully successfully built clone, or nothing at all.

Bug: 516303
Change-Id: I9b18c60f8f99816d42a3deb7d4a33a9f22eeb709
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
7 years agoUpgrade japicmp-maven-plugin to latest version 95/96695/4
David Pursehouse [Wed, 10 May 2017 01:25:51 +0000 (10:25 +0900)]
Upgrade japicmp-maven-plugin to latest version

Change-Id: Iace4350e51592e42f0dacf05558e53a6f87e1a6a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoUpgrade maven-pmd-plugin to latest version 94/96694/4
David Pursehouse [Wed, 10 May 2017 01:23:54 +0000 (10:23 +0900)]
Upgrade maven-pmd-plugin to latest version

Change-Id: Ief52488d97bb2771b4c5a40c4a9578c68a24964b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoRemove unused clirr-maven-plugin from LFS pom.xml files 93/96693/4
David Pursehouse [Wed, 10 May 2017 01:08:10 +0000 (10:08 +0900)]
Remove unused clirr-maven-plugin from LFS pom.xml files

Change-Id: I7252b6c89d91ac675c0e02e4d17ba0212b617098
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoUpdate jetty to 9.4.5 59/96859/6
Mat Booth [Thu, 11 May 2017 14:46:50 +0000 (15:46 +0100)]
Update jetty to 9.4.5

* Adapt to API removals in jetty 9.4+
* Manifests changed to restrict jetty to [9.4.5,10.0.0)

Bug: 514336
Bug: 516514
Change-Id: Ifcfd968084dfa6db0ae07cf541d33a6cdedc1ee2
Signed-off-by: Mat Booth <mat.booth@redhat.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoSpecify minimum Maven version in pom.xml 92/96692/2
David Pursehouse [Wed, 10 May 2017 01:05:41 +0000 (10:05 +0900)]
Specify minimum Maven version in pom.xml

Maven version 3.3.1 is the minimum required version as reported
by running:

  mvn versions:display-plugin-updates

Change-Id: I9514013dcffa6cb945496515c3eb4894c9043d7b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoCheckout should not use too long filenames 88/95588/2
Christian Halstrick [Mon, 24 Apr 2017 12:33:47 +0000 (14:33 +0200)]
Checkout should not use too long filenames

DirCacheCheckout is generating names for temporary files. It was not checking
the length of this filenames. It may happen that a generated filename is
longer than 255 chars which causes problems on certain platforms. Make sure
that filenames for temporary files do not exceed 255 chars.

Bug: 508823
Change-Id: I9475c04351ce3faebdc6ad40ea4faa3c326815f4

7 years agoSupport pull on detached HEAD 47/93047/5
Mickael Istria [Tue, 14 Mar 2017 16:41:55 +0000 (17:41 +0100)]
Support pull on detached HEAD

Bug: 485396
Change-Id: I82be09385c9b0bcc0054fea5a9cb9d178a41e278
Signed-off-by: Mickael Istria <mistria@redhat.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoReset ObjectWalker when it starts a new walk 52/96352/2
Zhen Chen [Wed, 3 May 2017 21:56:40 +0000 (14:56 -0700)]
Reset ObjectWalker when it starts a new walk

The ObjectWalker in PackWriterBitmapWalker needs to be reset whenever it
starts a new walk. Move this responsibility from the caller to the
method when the new walk starts.

Change-Id: Ib66003be1b5bdc80f46b9bbbb17d45e616714912
Signed-off-by: Zhen Chen <czhen@google.com>
7 years agoFix stack overflow in MergeBaseGenerator 97/96097/3
Shawn Pearce [Sat, 29 Apr 2017 15:27:41 +0000 (08:27 -0700)]
Fix stack overflow in MergeBaseGenerator

Some repository topologies can cause carryOntoHistory to overflow the
thread stack, due to its strategy of recursing into the 2nd+ parents
of a merge commit.  This can easily happen if a project maintains a
local fork, and frequently pulls from the upstream repository, which
itself may have a branchy history.

Rewrite the carryOntoHistory algorithm to use a fixed amount of thread
stack, pushing the save points onto the heap.  By using heap space the
thread stack depth is no longer a concern.  Repositories are instead
limited by available memory.

The algorithm is now structured as two loops:

  carryOntoHistory: This outer loop pops saved commits off the top of
  the stack, allowing the inner loop algorithm to dive down that path
  and carry bits onto commits along that part of the graph.  The loop
  ends when there are no more stack elements.

  carryOntoHistoryInner: The inner loop walks along a single path of
  the graph. For a string of pearls (commits with one parent each)

    r <- s <- t <- u

  the algorithm walks backwards from u to r by iteratively updating
  its local variable 'c'.  This avoids heap allocation along a simple
  path that does not require remembering state.

  The inner loop breaks in the HAVE_ALL case, when all bits have been
  found to be previously set on the commit.  This occurs when a prior
  iteration of the outer loop (carryOntoHistory) explored a different
  path to this same commit, and copied the bits onto it.

  When the inner loop encounters a merge commit, it pushes all parents
  onto the heap based stack by allocating individual CarryStack
  elements for each parent.  Parents are pushed in order, allowing
  side branches to be explored first.

  A small optimization is taken for the last parent, avoiding pushing
  it and instead updating 'c', allowing the side branch to be entered
  without allocating a CarryStack.

Change-Id: Ib7b67d90f141c497fbdc61a31b0caa832e4b3c04

7 years agoClone: add --recurse-submodules option 91/91591/8
David Pursehouse [Wed, 22 Feb 2017 04:21:49 +0000 (13:21 +0900)]
Clone: add --recurse-submodules option

Add the --recurse-submodules option on the command, which causes
submodules to also be initialized and updated.

Add a callback interface on CloneCommand and SubmoduleUpdateCommand to
them to provide progress feedback for clone operations.

Change-Id: I41b1668bc0d0bdfa46a9a89882c9657ea3063fc1
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoFix unnecessary type paramaters 23/95523/1
Shawn Pearce [Sat, 22 Apr 2017 21:32:41 +0000 (14:32 -0700)]
Fix unnecessary type paramaters

Can be inferred by the compiler.

Change-Id: If880ddfb7d7af2be70729d0c9f73c7c821b9c652

7 years agoDelete expired garbage even when there is no GC pack present. 99/95499/5
Thirumala Reddy Mutchukota [Fri, 21 Apr 2017 19:26:33 +0000 (12:26 -0700)]
Delete expired garbage even when there is no GC pack present.

Delete the condition to check whether the garbage pack creation time
is older than the last GC operation, because it's not possible to
find the last GC operation time when there is no GC pack.

Add additional tests to make sure the contents of the expired garbage
packs are considered during the GC operation and any actively
referenced objects from the garbage packs are copied successfully
into the GC pack before deleting the garbage pack.

Change-Id: I09e8b2656de8ba7f9b996724ad1961d908e937b6
Signed-off-by: Thirumala Reddy Mutchukota <thirumala@google.com>
7 years agoUpdate eclipse-jarsigner-plugin to 1.1.4 27/95427/1
Matthias Sohn [Thu, 20 Apr 2017 21:21:15 +0000 (23:21 +0200)]
Update eclipse-jarsigner-plugin to 1.1.4

Change-Id: Id3be21fe5146dedd46a1399e885c6d5f4778dda2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoAdd parseCommit(AnyObjectId) method to Repository. 45/94245/4
Martin Fick [Fri, 31 Mar 2017 17:31:47 +0000 (11:31 -0600)]
Add parseCommit(AnyObjectId) method to Repository.

It is quite common to want to parse a commit without already having a
RevWalk.  Provide a shortcut to do so to make it more convenient, and to
ensure that the RevWalk is released afterwards.

Signed-off-by: Martin Fick<mfick@codeaurora.org>
Change-Id: I9528e80063122ac318f115900422a24ae49a920e

7 years agoRepoCommand: Add linkfile support. 97/85097/15
Dan Willemsen [Tue, 15 Nov 2016 23:33:53 +0000 (15:33 -0800)]
RepoCommand: Add linkfile support.

Android wants them to work, and we're only interested in them for bare
repos, so add them just for that.

Make sure to use symlinks instead of just using the copyfile
implementation. Some scripts look up where they're actually located in
order to find related files, so they need the link back to their
project.

Change-Id: I929b69b2505f03036f69e25a55daf93842871f30
Signed-off-by: Dan Willemsen <dwillemsen@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Jeff Gaston <jeffrygaston@google.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoAdd some tests for alternates 83/95083/3
Matthias Sohn [Fri, 14 Apr 2017 20:57:23 +0000 (22:57 +0200)]
Add some tests for alternates

Change-Id: I00d256d0e132c0b5ff02ff27a26fbf21ecc1bccd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoMerge "Process all "have"s even when MissingObjectException is encountered"
Jonathan Nieder [Mon, 17 Apr 2017 18:53:19 +0000 (14:53 -0400)]
Merge "Process all "have"s even when MissingObjectException is encountered"

7 years agoProcess all "have"s even when MissingObjectException is encountered 36/95136/4
Jonathan Nieder [Mon, 17 Apr 2017 18:16:50 +0000 (11:16 -0700)]
Process all "have"s even when MissingObjectException is encountered

Because objects described by the client using "have" lines do not need
to be reachable by any ref on the server, it is possible for them to
point to missing objects in the reachability graph.  When such an
object is encountered, I1097a2defa4a9dcf502ca8baca5d32880378818f (Only
throw MissingObjectException when necessary, 2017-03-29) aborts the
"have" walk early to salvage the fetch.  The downside of that change
is that remaining "have"s are ignored unless they pointed directly to
an object with a bitmap.  In the worst case this can increase the
bandwidth cost of a fetch to the cost of a clone because most "have"s
are ignored.

Avoid this cost by bypassing the failed "have" completely and moving
on to the remaining "have"s.

Change-Id: Iac236b6d05f735078c9935abfa6e58d1eb47f388

7 years agoMerge "Prevent alternates loop"
David Pursehouse [Mon, 17 Apr 2017 16:01:54 +0000 (12:01 -0400)]
Merge "Prevent alternates loop"

7 years agoPrevent alternates loop 48/55148/11
Martin Fick [Tue, 24 Jan 2017 18:00:54 +0000 (11:00 -0700)]
Prevent alternates loop

When looping through alternates, prevent visiting the same object
directory twice. This could happen when the objects/info/alternates file
includes itself directly or indirectly via a another repo and its
alternates file.

Change-Id: I79bb3da099ebc3c262d2e6c61ed4578eb1aa3474
Signed-off-by: James Melvin <jmelvin@codeaurora.org>
Signed-off-by: Martin Fick <mfick@codeaurora.org>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoAdd missing @since tag for new API RepoCommand.setTargetURI() 80/95080/1
Matthias Sohn [Fri, 14 Apr 2017 17:49:19 +0000 (19:49 +0200)]
Add missing @since tag for new API RepoCommand.setTargetURI()

Change-Id: I4531b94e3a04606a69eeb3c3d154510b87507012
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoUpdate Maven plugins 78/95078/1
Matthias Sohn [Fri, 14 Apr 2017 16:47:17 +0000 (18:47 +0200)]
Update Maven plugins

- japicmp-maven-plugin to 0.8.1
- maven-surefire-plugin to 2.20
- maven-surefire-report-plugin to 2.20
- tycho-extras to 1.0.0

Change-Id: Iecc9a5aeb7811a8ecc8198c8836a4a739be3cc08
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoBazel: Restrict src globs to Java source files 62/94962/1
David Pursehouse [Thu, 13 Apr 2017 05:14:55 +0000 (14:14 +0900)]
Bazel: Restrict src globs to Java source files

Generating the src list with an unrestricted wildcard causes all
files in the source tree to be included. This results in junk files
such as .orig (generated during merge conflict resolution) to be
included, which causes in a build error:

  in srcs attribute of java_library rule //org.eclipse.jgit:jgit:
  file '//org.eclipse.jgit:src/org/eclipse/jgit/gitrepo/RepoCommand.java.orig'
  is misplaced here (expected .java, .srcjar or .properties).

Modify the globs to only include Java source files.

Change-Id: Iaef3db33ac71d71047cd28acb0378e15cb09ece9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoFix RepoCommand to allow for relative URLs 58/94158/17
Han-Wen Nienhuys [Tue, 28 Mar 2017 12:00:38 +0000 (14:00 +0200)]
Fix RepoCommand to allow for relative URLs

This is necessary for deploying submodules on android.googlesource.com.

* Allow an empty base URL. This is useful if the 'fetch' field is "."
  and all names are relative to some host root.

* The URLs in the resulting superproject are relative to the
  superproject's URL. Add RepoCommand#setDestinationURI to
  set this. If unset, the existing behavior is maintained.

* Add two tests for the Android and Gerrit case, checking the URL
  format in .gitmodules; the tests use a custom RemoteReader which is
  representative of the use of this class in Gerrit's Supermanifest
  plugin.

Change-Id: Ia75530226120d75aa0017c5410fd65d0563e91b
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoMerge "BundleWriter: Allow constructing from only an ObjectReader"
Jonathan Nieder [Thu, 13 Apr 2017 01:12:12 +0000 (21:12 -0400)]
Merge "BundleWriter: Allow constructing from only an ObjectReader"

7 years agoMerge "Only throw MissingObjectException when necessary"
Terry Parker [Wed, 12 Apr 2017 14:25:09 +0000 (10:25 -0400)]
Merge "Only throw MissingObjectException when necessary"

7 years agoBundleWriter: Allow constructing from only an ObjectReader 64/94864/2
Dave Borowitz [Tue, 11 Apr 2017 19:30:43 +0000 (15:30 -0400)]
BundleWriter: Allow constructing from only an ObjectReader

Change-Id: I01821d6a9fbed7a5fe4619884e42937fbd6909ce

7 years agoMerge branch 'stable-4.7' 84/94784/1
Matthias Sohn [Mon, 10 Apr 2017 22:54:06 +0000 (00:54 +0200)]
Merge branch 'stable-4.7'

* stable-4.7:
  Cleanup and test trailing slash handling in ManifestParser
  ManifestParser: Throw exception if remote does not have fetch attribute

Change-Id: Ia9dc3110bcbdae05175851ce647ffd11c542f4c0
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoCleanup and test trailing slash handling in ManifestParser 28/94528/3
Han-Wen Nienhuys [Tue, 28 Mar 2017 12:00:38 +0000 (14:00 +0200)]
Cleanup and test trailing slash handling in ManifestParser

This is a workaround for
https://bugs.openjdk.java.net/browse/JDK-4666701.

Change-Id: Idd04657e8d95a841d72230f8881b6b899daadbc2
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoManifestParser: Throw exception if remote does not have fetch attribute 23/94523/3
Han-Wen Nienhuys [Thu, 6 Apr 2017 04:44:10 +0000 (13:44 +0900)]
ManifestParser: Throw exception if remote does not have fetch attribute

In the repo manifest documentation [1] the fetch attribute is marked
as "#REQUIRED".

If the fetch attribute is not specified, this would previously result in
NullPointerException. Throw a SAXException instead.

[1] https://gerrit.googlesource.com/git-repo/+/master/docs/manifest-format.txt

Change-Id: Ib8ed8cee6074fe6bf8f9ac6fc7a1664a547d2d49
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoAdd missing @Override annotations in AppServer.TestMappedLoginService 31/94731/1
Matthias Sohn [Sun, 9 Apr 2017 21:37:04 +0000 (23:37 +0200)]
Add missing @Override annotations in AppServer.TestMappedLoginService

Change-Id: Ia728f1d033ecdf96b22945bc1ae38e5cb11064dd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoRemove unused API filters 30/94730/1
Matthias Sohn [Sun, 9 Apr 2017 21:20:57 +0000 (23:20 +0200)]
Remove unused API filters

Change-Id: I1e00d71395228265aad4071b023024ee1bf855d5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoUpdate JGit version used to detect API changes to 4.7.0.201704051617-r 29/94729/1
Matthias Sohn [Sun, 9 Apr 2017 21:43:23 +0000 (23:43 +0200)]
Update JGit version used to detect API changes to 4.7.0.201704051617-r

We detect API changes during the Maven build using japicmp. Update the
reference version to the latest minor version 4.7.0.201704051617-r.

Change-Id: Iab354fbf745cdfe44f71ce0bb64bb838b8bcd57d

7 years agoExclude generated class UbcCheck from PMD checks 16/94716/2
Matthias Sohn [Sat, 8 Apr 2017 22:47:40 +0000 (00:47 +0200)]
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>
7 years agoMerge branch 'stable-4.7' 20/94720/1
David Pursehouse [Sun, 9 Apr 2017 12:03:44 +0000 (21:03 +0900)]
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>
7 years agoMerge branch 'stable-4.6' into stable-4.7 19/94719/1
David Pursehouse [Sun, 9 Apr 2017 11:03:26 +0000 (20:03 +0900)]
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>
7 years agoMerge branch 'stable-4.5' into stable-4.6 17/94717/1
David Pursehouse [Sun, 9 Apr 2017 08:22:30 +0000 (17:22 +0900)]
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>
7 years agoPrepare 4.5.3-SNAPSHOT builds 05/94705/1
Matthias Sohn [Fri, 7 Apr 2017 22:31:09 +0000 (00:31 +0200)]
Prepare 4.5.3-SNAPSHOT builds

Change-Id: I69681b7a5687ca76bd0dd5d3e7ce2cff841d0e32
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoJGit v4.5.2.201704071617-r 00/94700/1 v4.5.2.201704071617-r
Matthias Sohn [Fri, 7 Apr 2017 20:17:27 +0000 (22:17 +0200)]
JGit v4.5.2.201704071617-r

Change-Id: I66402643d7c84c90bf5cefed4d2ec3aa68c94cfb
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoSilence API error for new method added to abstract MergeStrategy 96/94596/1
Matthias Sohn [Thu, 6 Apr 2017 16:17:22 +0000 (18:17 +0200)]
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>
7 years agoFix @since tags of new API added after 4.7.0 95/94595/1
Matthias Sohn [Thu, 6 Apr 2017 16:16:04 +0000 (18:16 +0200)]
Fix @since tags of new API added after 4.7.0

Change-Id: I356f71cdef8e23a9b06cf0a4079060a116b9ed27
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoMerge branch 'stable-4.7' 22/94522/1
David Pursehouse [Thu, 6 Apr 2017 04:28:16 +0000 (13:28 +0900)]
Merge branch 'stable-4.7'

* stable-4.7:
  PushConnectionTest: Increase maxCommandBytes again

Change-Id: Idbbc48964166ef80d578dde1b68e1ade892f00dc
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoPushConnectionTest: Increase maxCommandBytes again 20/94520/1
David Pursehouse [Thu, 6 Apr 2017 02:23:46 +0000 (11:23 +0900)]
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>
7 years agoMerge branch 'stable-4.7' 15/94515/1
David Pursehouse [Thu, 6 Apr 2017 01:10:14 +0000 (10:10 +0900)]
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>
7 years agoOnly throw MissingObjectException when necessary 09/94109/5
Zhen Chen [Thu, 30 Mar 2017 05:47:23 +0000 (22:47 -0700)]
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>
7 years agoPrepare 4.7.1-SNAPSHOT 06/94506/1
Matthias Sohn [Wed, 5 Apr 2017 22:16:53 +0000 (00:16 +0200)]
Prepare 4.7.1-SNAPSHOT

Change-Id: I16a45035258276217446bccc0ad1b0991383aa0c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoSupport creating Mergers without a Repository 09/94409/7
Dave Borowitz [Fri, 31 Mar 2017 15:49:12 +0000 (11:49 -0400)]
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

7 years agoJGit v4.7.0.201704051617-r 96/94496/1 v4.7.0.201704051617-r
Matthias Sohn [Wed, 5 Apr 2017 20:17:44 +0000 (22:17 +0200)]
JGit v4.7.0.201704051617-r

Change-Id: Ic2bd6aca0b7a7e0597ffc1f7cf647b49878f9950
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoPrepare 4.8.0-SNAPSHOT builds 68/94468/1
Matthias Sohn [Wed, 5 Apr 2017 12:49:49 +0000 (14:49 +0200)]
Prepare 4.8.0-SNAPSHOT builds

Change-Id: Ifea6750e79d417a8a2a891b3b5f96d68c7200011
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoFix version.sh to update version of imported jgit features 67/94467/1
Matthias Sohn [Wed, 5 Apr 2017 12:48:00 +0000 (14:48 +0200)]
Fix version.sh to update version of imported jgit features

Change-Id: I9f29e84b4d357ac8910b8dc534ea91dc9be96079
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoMerge "Fixed NP dereference error reported by ecj in UploadPack.stopBuffering()"
Andrey Loskutov [Wed, 5 Apr 2017 11:53:24 +0000 (07:53 -0400)]
Merge "Fixed NP dereference error reported by ecj in UploadPack.stopBuffering()"

7 years agoMerge branch 'stable-4.7' 31/94431/1
David Pursehouse [Wed, 5 Apr 2017 08:22:11 +0000 (17:22 +0900)]
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>
7 years agoFixed NP dereference error reported by ecj in UploadPack.stopBuffering() 29/94429/2
Andrey Loskutov [Wed, 5 Apr 2017 07:10:10 +0000 (09:10 +0200)]
Fixed NP dereference error reported by ecj in UploadPack.stopBuffering()

Introduced via commit 3b2508b51467c3cb0541c004488eaabae2842f9e.

Change-Id: I2b6175c095aea2868a8c302103095accde5170e3
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
7 years agoMerge "Make diff locations more consistent"
Shawn Pearce [Wed, 5 Apr 2017 02:26:35 +0000 (22:26 -0400)]
Merge "Make diff locations more consistent"

7 years agoTarFormat: Use commit time as timestamp for entries 22/94422/1
Yasuhiro Takagi [Sun, 2 Apr 2017 03:08:53 +0000 (12:08 +0900)]
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>
7 years agoMerge branch 'stable-4.7' 21/94421/1
David Pursehouse [Tue, 4 Apr 2017 22:58:29 +0000 (07:58 +0900)]
Merge branch 'stable-4.7'

* stable-4.7:
  PushConnectionTest#limitCommandBytes: Increase maxCommandBytes

Change-Id: I354f46475ee96eb3b31abd303b5df2f3023fcf75
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
7 years agoResolveMergerTest: Add tests for content merges 16/94416/1
Dave Borowitz [Tue, 4 Apr 2017 21:23:14 +0000 (17:23 -0400)]
ResolveMergerTest: Add tests for content merges

Change-Id: I2b85cc239e9b3090426c956cbf9af3deb4106a41

7 years agoNameConflictTreeWalk: Mark repo param @Nullable 11/94411/1
Dave Borowitz [Tue, 4 Apr 2017 18:53:17 +0000 (14:53 -0400)]
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

7 years agoMerge "Buffer the response until request parsing has done"
Jonathan Nieder [Tue, 4 Apr 2017 18:25:38 +0000 (14:25 -0400)]
Merge "Buffer the response until request parsing has done"

7 years agoBuffer the response until request parsing has done 49/94249/3
Masaya Suzuki [Fri, 31 Mar 2017 20:54:02 +0000 (13:54 -0700)]
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>
7 years agoPushConnectionTest#limitCommandBytes: Increase maxCommandBytes 66/94366/1
David Pursehouse [Tue, 4 Apr 2017 12:14:17 +0000 (21:14 +0900)]
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>
7 years agoMake diff locations more consistent 63/93663/5
KB Sriram [Wed, 22 Mar 2017 18:42:38 +0000 (11:42 -0700)]
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>
7 years agoDowngrade Jetty to 9.3.17.v20170317 in Bazel build 75/94275/1
David Pursehouse [Sun, 2 Apr 2017 23:22:26 +0000 (08:22 +0900)]
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>
7 years agoMerge branch 'stable-4.6' 68/94268/2
Matthias Sohn [Sun, 2 Apr 2017 11:56:32 +0000 (13:56 +0200)]
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>
7 years agoUpdate Jetty to 9.3.17.v20170317 57/94257/2
Matthias Sohn [Sat, 1 Apr 2017 10:38:22 +0000 (12:38 +0200)]
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>
7 years agoRevert "Update Jetty to 9.4.1.v20170120 in buck build" 56/94256/1
Matthias Sohn [Sat, 1 Apr 2017 11:03:48 +0000 (13:03 +0200)]
Revert "Update Jetty to 9.4.1.v20170120 in buck build"

This reverts commit d3b80b951c0bf995f7d210710e3d31e9d529efe2.

Change-Id: I596ba596f3e857346020e01b0a018d90a0b27edd

7 years agoRevert "Update Jetty to 9.4.1.v20170120" 93/94193/1
David Pursehouse [Fri, 31 Mar 2017 05:49:30 +0000 (14:49 +0900)]
Revert "Update Jetty to 9.4.1.v20170120"

This reverts commit e05caf91f1df86a95d3e0454000d345bb90a415e.

Change-Id: Ia4287f130034a790759b5035505a093b4616a05a

7 years agoRemove unused import from ManifestParser 87/94187/1
Matthias Sohn [Thu, 30 Mar 2017 22:38:36 +0000 (00:38 +0200)]
Remove unused import from ManifestParser

Change-Id: Ie60ef9c7bc6ce0fdf017949ebfb9a21753e70506
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
7 years agoDowngrade jetty to 9.3.9.v20160517 85/94185/2
Matthias Sohn [Thu, 30 Mar 2017 22:34:57 +0000 (00:34 +0200)]
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>
7 years agoRequire jetty 9.4.0 consistently 31/94131/2
Matthias Sohn [Sun, 26 Mar 2017 23:14:59 +0000 (01:14 +0200)]
Require jetty 9.4.0 consistently

Change-Id: If9de4c0e43850dec46858bd58e9692a7e099cbc3

7 years agoDocument the intended use of RepoCommand#setURI() 47/94047/3
Han-Wen Nienhuys [Wed, 29 Mar 2017 11:51:57 +0000 (13:51 +0200)]
Document the intended use of RepoCommand#setURI()

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I4a59dd8278b7b0026094692127b7f55e89c10bae

7 years agoNoop changes to ManifestParser 71/93971/3
Han-Wen Nienhuys [Tue, 7 Mar 2017 18:14:27 +0000 (19:14 +0100)]
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

7 years agoConsistently use 'path' for the path to a subrepo in RepoCommand 56/93756/5
Han-Wen Nienhuys [Thu, 23 Mar 2017 17:20:08 +0000 (18:20 +0100)]
Consistently use 'path' for the path to a subrepo in RepoCommand

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I79ea7eb7b4d319e0100e3121aca5ef82eb8ad92a

7 years agoMerge branch 'stable-4.6' 73/93873/2
Matthias Sohn [Mon, 27 Mar 2017 08:52:36 +0000 (10:52 +0200)]
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>
7 years agoMerge branch 'stable-4.5' into stable-4.6 62/93862/1
David Pursehouse [Mon, 27 Mar 2017 01:14:50 +0000 (10:14 +0900)]
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>
7 years agoOnly mark packfile invalid if exception signals permanent problem 44/93844/5
Matthias Sohn [Sat, 25 Mar 2017 01:33:06 +0000 (02:33 +0100)]
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>
7 years agoRaise minimum version of o.e.jetty.security to 9.4.0 56/93856/1
Matthias Sohn [Sat, 25 Mar 2017 22:34:24 +0000 (23:34 +0100)]
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>
7 years agoDon't flag a packfile invalid if opening existing file failed 75/93775/4
Luca Milanesio [Fri, 24 Mar 2017 00:18:12 +0000 (00:18 +0000)]
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>