|
|
|
@@ -39,6 +39,7 @@ public class DVCUtils { |
|
|
|
|
|
|
|
@Value("${proxy.port}") |
|
|
|
private Integer port; |
|
|
|
|
|
|
|
private class ProxyConfigCallback implements TransportConfigCallback { |
|
|
|
@Override |
|
|
|
public void configure(Transport transport) { |
|
|
|
@@ -259,6 +260,7 @@ public class DVCUtils { |
|
|
|
log.error("Error occurred while creating local branch", e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 删除本地分支 |
|
|
|
* |
|
|
|
@@ -440,17 +442,19 @@ public class DVCUtils { |
|
|
|
.forEach(ref -> { |
|
|
|
String fullBranchName = ref.getName(); |
|
|
|
String branchName = fullBranchName.replace("refs/remotes/origin/", ""); |
|
|
|
try { |
|
|
|
completionService.submit(() -> { |
|
|
|
try { |
|
|
|
processBranch(git, repository, credentialsProvider, fullBranchName, branchName); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Failed to process branch: " + branchName, e); |
|
|
|
} |
|
|
|
return null; |
|
|
|
}); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Task submission rejected", e); |
|
|
|
if ("master".equals(branchName)) { |
|
|
|
try { |
|
|
|
completionService.submit(() -> { |
|
|
|
try { |
|
|
|
processBranch(git, repository, credentialsProvider, fullBranchName, branchName); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Failed to process branch: " + branchName, e); |
|
|
|
} |
|
|
|
return null; |
|
|
|
}); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("Task submission rejected", e); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
@@ -523,8 +527,6 @@ public class DVCUtils { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void gitFetch(String localPath, String username, String password) throws IOException, GitAPIException { |
|
|
|
FileRepositoryBuilder builder = new FileRepositoryBuilder(); |
|
|
|
Repository repository = builder.setGitDir(new File(localPath, ".git")) |
|
|
|
|