如何撤消“svn 副本”
我不小心通过使用“svn copy”复制主干来覆盖旧分支。 更具体地说,对于每个版本,主干都会被分支并保留为标签,使用:
svn copy svn://machine/REPOS/trunk svn://machine/REPOS/tags/$RELEASENR
但这次“RELEASENR”的值是旧的现有分支而不是新分支的值。 有人对如何消除这个错误有任何想法吗? 已经谢谢了!
I've accidentally overwritten an old branch by copying trunk over it using 'svn copy'. More specifically, for every release, trunk is branched and kept as a tag, using:
svn copy svn://machine/REPOS/trunk svn://machine/REPOS/tags/$RELEASENR
But this time the value of 'RELEASENR' was that of an old existing branch instead of a new one. Anybody have any ideas on how to undo this mistake? Thanks already!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Subversion 不是这样工作的。 你实际上还没有覆盖它。 如果复制或移动的目标存在并且是一个目录,则复制或移动的项目将放置在该目录中:
如果您查看,您应该发现:
这是您的主干的副本只是尝试标记。 这种情况下的修复很简单:(
如果您不熟悉 *nix: \ 意味着我已将一个逻辑行分成两个物理行,以免水平滚动条过度工作。)
Subversion doesn't work that way. You haven't actually overwritten it. If the target of the copy or a move exists and is a directory, then the copied or moved item is placed in that directory:
If you look, you should find:
Which is a copy of the trunk you just tried to tag. The fix in this case is easy:
(In case you're not *nix conversant: The \ means I've broken one logical line into two physical lines to spare your horizontal scrollbar from overwork.)
为了撤消,只需使用
如果更改尚未提交,
In order to undo
if the change has not yet been committed, just use
您可以通过合并回先前的修订来撤消上次的修订。
请参阅http://anilsaldhana.blogspot.com/2007/11/svn- undo-change.html
然后提交
You can undo your last revision by merging back to the previous revision.
See http://anilsaldhana.blogspot.com/2007/11/svn-undo-change.html
and then commit