开发者

change svn directory property on the fly with svnkit

I need to change the value of a versioned custom property of a svn directory on the fly. I do not want to alter any content, just change the value of the property of the already existing directory. I am using svnkit in java.

How would i go about it?

开发者_如何学JAVAexample: 
http:://svnserver.com/example/directorya   ... has svn property: myproperty = abc

after the operation:
http:://svnserver.com/example/directorya   ... has svn property: myproperty = def


somehow got it to work:

SVNRepository repository = SVNRepositoryFactory.create(url);

ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(user,password);
repository.setAuthenticationManager(authManager);

SVNPropertyValue svnPropertyValue = SVNPropertyValue.create("def");
ISVNEditor editor = repository.getCommitEditor("comment", null);
editor.openRoot(-1);
editor.openDir("dirname", -1);
editor.changeDirProperty("myproperty", svnPropertyValue);
editor.closeEdit();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜