feat: support SVN auth and project credentials
- add username/password fields to project dialog and model - pass optional auth to SVN info/status/log/diff/update/commit services - centralize SVN CLI auth flags in SvnService and fix header text Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -25,7 +25,7 @@ public class UpdateService extends SvnService {
|
||||
* @throws InterruptedException 中断异常
|
||||
* @throws TimeoutException 超时异常
|
||||
*/
|
||||
public UpdateResult update(String workingDirectory, String revision)
|
||||
public UpdateResult update(String workingDirectory, String revision, String username, String password)
|
||||
throws IOException, InterruptedException, TimeoutException {
|
||||
logger.info("更新工作副本: {}", workingDirectory);
|
||||
|
||||
@@ -34,6 +34,7 @@ public class UpdateService extends SvnService {
|
||||
}
|
||||
|
||||
List<String> args = new ArrayList<>();
|
||||
addAuthArgs(args, username, password);
|
||||
if (revision != null && !revision.isEmpty()) {
|
||||
args.add("-r");
|
||||
args.add(revision);
|
||||
@@ -77,9 +78,14 @@ public class UpdateService extends SvnService {
|
||||
* @throws InterruptedException 中断异常
|
||||
* @throws TimeoutException 超时异常
|
||||
*/
|
||||
public UpdateResult update(String workingDirectory, String username, String password)
|
||||
throws IOException, InterruptedException, TimeoutException {
|
||||
return update(workingDirectory, null, username, password);
|
||||
}
|
||||
|
||||
public UpdateResult update(String workingDirectory)
|
||||
throws IOException, InterruptedException, TimeoutException {
|
||||
return update(workingDirectory, null);
|
||||
return update(workingDirectory, null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user