svn copy -r [revision number] [url] [path]

♀尐吖头ヾ 提交于 2020-01-02 00:56:07

问题


So, I've done this before and I just can't seem to figure out what's broken this time...

I'm trying to restore a file from SVN. I went and found the revision where it was deleted (or at least last existed. I verified by using svn list -r)

Here is my command:

svn copy -r 925 url/to/repo/foldername htdocs/foldername

I keep getting an error:

svn: '/!svn/bc/973/.../htdocs/templates' path not found

From my understanding that means its looking in revision 973 (which is HEAD) instead of 925.

What am I missing here?


回答1:


I think what you want is:

svn copy url/to/repo/foldername@925 htdocs/foldername

From svn help copy:

usage: copy SRC[@REV]... DST

See Peg and Operative Revisions.

Using -r REV without @REV means "the ancestor (revision REV) of the current file" while @REV without -r rev means "the file at REV". This semantic difference is significant because svn tracks copies (and renames).



来源:https://stackoverflow.com/questions/6591938/svn-copy-r-revision-number-url-path

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