Handle renames in parallel branches

旧街凉风 提交于 2019-12-04 10:08:16

I've been reading a lot since I asked the question and it appears that file renaming is the weak point of most source control systems. As about Subversion, it's one of those things that just can't be done (like merges before 1.5).

This is the workaround that seems to work best:

  1. Perform regular rename (copy+delete) in trunk. Commit.
  2. For each branch:
    • Tag revision from #1 as merged, e.g., svn merge --record-only (command line) or [X] Only record the merge (TortoiseSVN).
    • Perform a regular rename (copy+delete).

You get no tree conflicts and, the best part, both files are still regarded as related, so you can still port and backport between branches.

(Not really tested on directories, just plain files. Comments welcome.)

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