The handle is renamed to parallel branches

I have a typical Subversion setup:

/trunk /branches/client-one /branches/client-two /branches/client-three 

Trunk has a core development, and branches support client configuration. From time to time I transfer changes from the trunk to the branches and vice versa:

 [+] /trunk/readme-trunk.txt [port] /trunk/readme-trunk.txt -> /branches/client-one/readme-trunk.txt [port] /trunk/readme-trunk.txt -> /branches/client-two/readme-trunk.txt [port] /trunk/readme-trunk.txt -> /branches/client-three/readme-trunk.txt 

It works pretty flawlessly, unless I need to rename a file. Now, as I do this, I always get tree conflicts and, depending on the steps I take, I lose local modifications or I can no longer transfer future changes.

Is it possible to rename the file and still be able to transfer the changes back and forth?

 [rename] /trunk/readme-trunk.txt -> /trunk/readme.txt [port] /trunk/readme.txt -> /branches/client-one/readme.txt [port] /trunk/readme.txt -> /branches/client-two/readme.txt [port] /trunk/readme.txt -> /branches/client-three/readme.txt [edit] /trunk/readme.txt [port] /trunk/readme.txt -> /branches/client-one/readme.txt [port] /trunk/readme.txt -> /branches/client-two/readme.txt [port] /trunk/readme.txt -> /branches/client-three/readme.txt 

(Most of the documentation on this subject implies that tree conflicts occur when two developers modify the same file, this is not so, as I am the only developer.)

+4
source share
1 answer

I've read a lot since I asked the question, and it seems that renaming files is the weak point of most version control systems. As for Subversion, this is one of those things that is simply impossible to do (e.g. merges before 1.5).

This is a workaround that works best:

  • Perform normal renaming (copy + delete) on the trunk. Commit.
  • For each branch:
    • Cancel tag verification from # 1 such as svn merge --record-only (command line) or [X] Only record the merge (TortoiseSVN).
    • Perform the usual renaming (copy + delete).

You have no tree conflicts, and most importantly, both files are still considered linked, so you can still transfer and perform feedback between branches.

(Not checked in directories, just files. Comments are welcome.)

+1
source

Source: https://habr.com/ru/post/891774/


All Articles