Преглед на файлове

Merge branch 'stable-4.9' into stable-4.10

* stable-4.9:
  Fix NoSuchFileException during directory cleanup in RefDirectory
  Externalize warning message in RefDirectory.delete()
  Suppress warning for trying to delete non-empty directory

Change-Id: Ied2d7a70c5544ff012687a1aeb6e07394d9bd6fd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
tags/v4.11.3.201809181037-r
David Pursehouse преди 5 години
родител
ревизия
59ee33aee4

+ 1
- 0
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties Целия файл

@@ -692,6 +692,7 @@ truncatedHunkOldLinesMissing=Truncated hunk, at least {0} old lines is missing
tSizeMustBeGreaterOrEqual1=tSize must be >= 1
unableToCheckConnectivity=Unable to check connectivity.
unableToCreateNewObject=Unable to create new object: {0}
unableToRemovePath=Unable to remove path ''{0}''
unableToStore=Unable to store {0}.
unableToWrite=Unable to write {0}
unauthorized=Unauthorized

+ 1
- 0
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java Целия файл

@@ -753,6 +753,7 @@ public class JGitText extends TranslationBundle {
/***/ public String tSizeMustBeGreaterOrEqual1;
/***/ public String unableToCheckConnectivity;
/***/ public String unableToCreateNewObject;
/***/ public String unableToRemovePath;
/***/ public String unableToStore;
/***/ public String unableToWrite;
/***/ public String unauthorized;

+ 3
- 2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java Целия файл

@@ -1286,13 +1286,14 @@ public class RefDirectory extends RefDatabase {
File dir = file.getParentFile();
for (int i = 0; i < depth; ++i) {
try {
Files.delete(dir.toPath());
Files.deleteIfExists(dir.toPath());
} catch (DirectoryNotEmptyException e) {
// Don't log; normal case when there are other refs with the
// same prefix
break;
} catch (IOException e) {
LOG.warn("Unable to remove path {}", dir, e);
LOG.warn(MessageFormat.format(JGitText.get().unableToRemovePath,
dir), e);
break;
}
dir = dir.getParentFile();

Loading…
Отказ
Запис