I developing a Eclipse plugin which creates branch. I'm using Subclipse, but this does not work. Error message: svn: E195000: A path under version control is needed for this operation
It works by command line:
svn cp svn://host/myRepo/trunk svn://host/myRepo/branches/aBrach -m "Please, copy"
But in my Eclpse plugin, I can't : (
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);
}
You probably want SVNRevision.HEAD
BASE can only be used if the source is a working copy.