如何 create/copy 使用 Sublicpse 分支
How to create/copy Branch using Sublicpse
我正在开发一个创建分支的 Eclipse 插件。我正在使用 Subclipse,但这不起作用。错误消息:svn: E195000: 此操作需要版本控制下的路径
它通过命令行工作:
svn cp svn://host/myRepo/trunk svn://host/myRepo/branches/aBrach -m "Please, copy"
但是在我的 Eclpse 插件中,我不能 : (
ISVNRepositoryLocation location = SVNProviderPlugin.getPlugin().getRepositories().getRepository("svn://host/myRepo");
SVNUrl origin = location.getUrl().appendPath("trunk");
SVNUrl branch = location.getUrl().appendPath("branches").appendPath("aBranch");
ISVNClientAdapter svnClient = null;
try{
svnClient = location.getSVNClient();
svnClient.copy(origin, branch, "Please, copy", SVNRevision.BASE, true);
}catch(Exception e){
location.returnSVNClient(svnClient);
}
你可能想要SVNRevision.HEAD
BASE 只能在源是工作副本时使用。
我正在开发一个创建分支的 Eclipse 插件。我正在使用 Subclipse,但这不起作用。错误消息:svn: E195000: 此操作需要版本控制下的路径
它通过命令行工作:
svn cp svn://host/myRepo/trunk svn://host/myRepo/branches/aBrach -m "Please, copy"
但是在我的 Eclpse 插件中,我不能 : (
ISVNRepositoryLocation location = SVNProviderPlugin.getPlugin().getRepositories().getRepository("svn://host/myRepo");
SVNUrl origin = location.getUrl().appendPath("trunk");
SVNUrl branch = location.getUrl().appendPath("branches").appendPath("aBranch");
ISVNClientAdapter svnClient = null;
try{
svnClient = location.getSVNClient();
svnClient.copy(origin, branch, "Please, copy", SVNRevision.BASE, true);
}catch(Exception e){
location.returnSVNClient(svnClient);
}
你可能想要SVNRevision.HEAD
BASE 只能在源是工作副本时使用。