0

我需要即时更改 svn 目录的版本化自定义属性的值。我不想更改任何内容,只需更改现有目录的属性值即可。我在java中使用svnkit。

我该怎么办?

example: 
http:://svnserver.com/example/directorya   ... has svn property: myproperty = abc

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

1 回答 1

1

不知何故让它工作:

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();
于 2011-09-20T10:33:08.743 回答