svnkit:如何获取工作副本修订号?
我正在使用 SVNKit 1.3.2 并尝试获取工作副本修订号。
工作副本也使用 SVNKit 进行签出,但是当我尝试调用时,
clientManager.getLookClient().doGetYoungestRevision(destination);
我收到 FileNotFoundException 告诉我在目标路径下找不到“格式”文件,例如 /path/to/working/copy/format
我发现有两个问题: - 它尝试访问工作目录根目录中的“format”文件,而该文件应该位于 .svn 文件夹中
- 该 .svn 文件夹中没有文件。
有什么线索吗?谢谢你!
I am using SVNKit 1.3.2 and trying to obtain working copy revision number.
Working copy is checkouted also with SVNKit, but when I'm trying to call
clientManager.getLookClient().doGetYoungestRevision(destination);
I got FileNotFoundException telling me that 'format' file is not found under destination path, ex /path/to/working/copy/format
I can see 2 troubles:
- It tries to access 'format' file right in working directory root, while this file supposed to be in .svn folder
- There is not file in this .svn folder.
Any clues? Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
似乎应该通过 SVNStatusClient 完成:
虽然仍然不明白 doGetYoungestRevision(destination) 有什么问题...
Seems to be it should be done through SVNStatusClient:
Though still don't understand what's the problem with doGetYoungestRevision(destination)...
它不起作用,因为
doGetYoungestRevision
用于存储库,而不是工作副本。我希望能实现与您相同的目标,并发现当
destination
指向存储库时,它会返回存储库的最后修订号。该类本身用于使用存储库,您可以查看文档 这里。
It is not working because
doGetYoungestRevision
is for a repository, not for a working copy.I was hoping to achieve the same things as you, and found out that when
destination
is pointing to a repository, it returns the last revision number of the repository.The class in itself is for working with repository, you can look at the documentation here.