This is an automated email from the ASF dual-hosted git repository.
mattmann pushed a commit to branch gsoc18
in repository https://gitbox.apache.org/repos/asf/drat.git
The following commit(s) were added to refs/heads/gsoc18 by this push:
new 0503c5b - don't remove repo file it's needed - don't remove clone
dir, else we won't have somewhere to clone to.
0503c5b is described below
commit 0503c5bb5d813d1515f68b502eeeb47c4b3e1f7e
Author: Chris Mattmann <[email protected]>
AuthorDate: Mon Aug 13 22:29:55 2018 -0700
- don't remove repo file it's needed
- don't remove clone dir, else we won't have somewhere to clone to.
---
proteus/src/main/java/backend/ProcessDratWrapper.java | 14 --------------
proteus/src/main/java/backend/Utils.java | 8 +-------
2 files changed, 1 insertion(+), 21 deletions(-)
diff --git a/proteus/src/main/java/backend/ProcessDratWrapper.java
b/proteus/src/main/java/backend/ProcessDratWrapper.java
index 3702858..67db103 100644
--- a/proteus/src/main/java/backend/ProcessDratWrapper.java
+++ b/proteus/src/main/java/backend/ProcessDratWrapper.java
@@ -255,20 +255,6 @@ public class ProcessDratWrapper extends GenericProcess
this.wipeSolrCore(coreName);
}
- File repoFile = new File(Utils.getResetRepoFile());
- try {
- resetLog.logInfo("DRAT: reset: removing repo file: ["
- + Utils.getResetRepoFile() + "]");
- FileUtils.forceDelete(repoFile);
- } catch (FileNotFoundException e) {
- resetLog.logWarning("Error removing: [" + repoFile.getAbsolutePath()
- + "]: Message: " + e.getLocalizedMessage());
- } catch (IOException e) {
- resetLog
- .logWarning("Unable to remove file: [" + repoFile.getAbsolutePath()
- + "]: Message: " + e.getLocalizedMessage());
- }
-
resetLog.logInfo("DRAT: reset: recursively removed: [" +
Utils.getResetDirectories()
+ "]");
for (String dir : Utils.getResetDirectories()) {
diff --git a/proteus/src/main/java/backend/Utils.java
b/proteus/src/main/java/backend/Utils.java
index f6b7294..16c9d3b 100644
--- a/proteus/src/main/java/backend/Utils.java
+++ b/proteus/src/main/java/backend/Utils.java
@@ -38,19 +38,13 @@ public class Utils {
String DRAT_HOME = environment.get("DRAT_HOME");
resetDratConstants.add(DRAT_HOME + "/data/archive/");
- resetDratConstants.add(DRAT_HOME + "/data/jobs/");
- resetDratConstants.add(DRAT_HOME + "/data/clones/");
- resetRepoFile = DRAT_HOME + "/data/repo";
+ resetDratConstants.add(DRAT_HOME + "/data/jobs/");
}
public static Map<String, String> getEnvironment() {
return environment;
}
- public static String getResetRepoFile(){
- return resetRepoFile;
- }
-
public static List<String> getResetDirectories() {
return resetDratConstants;
}