svn copy -r [修订号] [url] [路径] [英] svn copy -r [revision number] [url] [path]
问题描述
所以,我以前做过这个,但我似乎无法弄清楚这次出了什么问题......
So, I've done this before and I just can't seem to figure out what's broken this time...
我正在尝试从 SVN 恢复文件.我去发现它被删除的修订版(或至少最后存在.我使用 svn list -r 进行了验证)
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)
这是我的命令:
svn copy -r 925 url/to/repo/foldername htdocs/foldername
我不断收到错误消息:
svn: '/!svn/bc/973/.../htdocs/templates' path not found
根据我的理解,这意味着它查看修订版 973(即 HEAD)而不是 925.
From my understanding that means its looking in revision 973 (which is HEAD) instead of 925.
我在这里遗漏了什么?
推荐答案
我想你想要的是:
svn copy url/to/repo/foldername@925 htdocs/foldername
来自svn help copy
:
usage: copy SRC[@REV]... DST
请参阅挂钩和操作修订.
使用-r REV而没有@REV
意味着当前文件的祖先(修订版REV)"而@REV
没有-r rev
> 表示REV 处的文件".这种语义差异很重要,因为 svn 跟踪副本(和重命名).
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).
这篇关于svn copy -r [修订号] [url] [路径]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!