SVN: How to get the first revision of a file?

若如初见. 提交于 2019-11-30 01:20:19
CMS

You could use svn log, with a reverse revision range:

svn log -r 1:HEAD --limit 1 <REPO_URL>

The last entry of

svn log http://...

For someone trying to do this in pysvn:

def get_branch_creation_rev(url)
    import pysvn
    cl = pysvn.Client()
    return  pysvn.Revision(pysvn.opt_revision_kind.number,
                           cl.log(url)[-1].data.get('revision').number)

Not sure what the command line method is. I use Tortoise on windows to do most of my SVN navigating. If you have that tool, just right click on the folder and it is tortoise SVN/Show Log.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!