SVN:如何获得文件的第一个修订版? [英] SVN: How to get the first revision of a file?
问题描述
使用存储库中的子目录时,如何在将该特定目录添加到存储库后查找修订?通过使用svn info http://.."我可以找出最后一次修改的时间(Last Changed Rev"),但我还需要找出该目录(或文件)是第一次添加(这是第一次"修订).
When working with a subdirectory in a repository, how to find the revision when that specific directory has been added to the repository? By using "svn info http://.." I can find out when it was modified for the last time ("Last Changed Rev"), but I also need to find out the revision number of the commit when that directory (or file) was added for the first time (it's "first" revision).
我一直在SVN book"上搜索,谷歌搜索,但显然没有结果.
I have been searching for that at the "SVN book", googling, but, obviously, I got no results.
注意:我需要这个来制作一个 PHP 脚本来下载日志并将它们存储在本地,只是为了清楚并避免使用 tortoise/svnx/versions/you_name_it 应用程序";)
Note: I need this for making a PHP script which downloads logs and stores them locally, just to make it clear and avoid "use tortoise/svnx/versions/you_name_it application" ;)
推荐答案
您可以使用 svn log,具有反向修订范围:
You could use svn log, with a reverse revision range:
svn log -r 1:HEAD --limit 1 <REPO_URL>
这篇关于SVN:如何获得文件的第一个修订版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!