Hey,
I want to get the uuid of a repository, and it will be indicator of the repository.
In SVNKit they get it like this:
String uuid = null;
SVNURL url = null;
try {
SVNAdminArea rootDir = rootWCAccess.open(wcRoot, false, 0);
uuid = rootDir.getEntry(rootDir.getThisDirName(), false).getUUID();
url = rootDir.getEntry(rootDir.getThisDirName(), false).getSVNURL();
} finally {
rootWCAccess.close();
}
checkCancelled();
if (uuid == null) {
if (url != null) {
SVNRepository repos = createRepository(url, wcRoot, rootWCAccess, true);
uuid = repos.getRepositoryUUID(true);
} else {
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ENTRY_MISSING_URL,
"''{0}'' has no URL", wcRoot);
SVNErrorManager.error(err, SVNLogType.WC);
}
}
// also use protocol, host and port as a key, not only uuid.
uuid += url.getProtocol() + ":" + url.getHost() + ":" + url.getPort() + ":" + url.getUserInfo();
So how can I get the same thing in native svn?
Thanks~
Huihuang
------------------
yellow.flying
2009-06-21
__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2363882
Received on 2009-06-21 03:56:42 CEST