svn:恢复文件内容更改而不恢复任何相关的合并信息?
如果您进行了合并,您可能会发现,在提交更改之前,您实际上不想接受合并到受影响文件一个中的任何更改。所以你这样做,例如:
$ svn revert foo.c
但是,这似乎也恢复了与该文件相关的合并信息。因此,当您进行后续合并时,它将再次合并完全相同的更改。
而不是恢复可以这样做:
$ svn cat foo.c > foo.c
但这似乎不是正确的做事方式?是否有更清楚地表明我想要实现的目标,即说“考虑对此文件进行合并,但不要更改其内容”?
If you've done a merge you may find, before committing the changes, that actually you don't want to accept any of the changes merged into one of the affected files. So you do e.g.:
$ svn revert foo.c
However this also seems to revert the mergeinfo related to this file. So when you do a subsequent merge it will merge in exactly the same changes again.
Rather than revert one could do:
$ svn cat foo.c > foo.c
But this doesn't seem like the right way to do things? Is there something that more clearly indicates what I'm trying to achieve, i.e. to say "consider the merge done for this file but don't change its contents"?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要阻止合并修订,请使用
--record-only
参数运行合并命令。To block a revision from getting merged, run the merge command with the
--record-only
param.