We are having havoc with our project at work, because our VCS is doing some awful merging when we move information across files.
The scenario is thus:
You have lots of files that, say, contain information about terms from a dictionary, so you have a file for each letter of the alphabet.
Users entering terms blindly follow the dictionary order, so they will put an entry like "kick the bucket" under B if that is where the dictionary happened to list it (or it might have been listed under both B, bucket and K, kick).
Later, other users move the terms to their correct files. Lots of work is being done on the dictionary terms all the time.
e.g. User A may have taken the B file and elaborated on the "kick the bucket" entry. User B took the B and K files, and moved the "kick the bucket" entry to the K file. Whichever order they end up getting committed in, the VCS will probably lose entries and not "figure out" that an entry has been moved.
(These entries are later automatically converted to an SQL database. But they are kept in a "human friendly" form for working on them, with lots of comments, examples etc. So it is not acceptable to say "make your users enter SQL directly".)
It is so bad that we have taken to almost manually merging these kinds of files now, because we can't trust our VCS. 🙁
So what is the solution? I would love to hear that there is a VCS that could cope with this. Or a better merge algorithm? Or otherwise, maybe someone can suggest a better workflow or file arrangement to try and avoid this problem?
Best Answer
I would recommend:
(Git is especially good at this)
You can test it quickly:
You have an empty dico in the master branch.
DevA comes along:
DevB comes along and get the work of devA:
Oh no! Wrong place for this definition!
Fix in devB branch. DevB goes on:
Meaning, in the devA branch, devA also work on this definition:
C:\test\git\dico>echo elabore def from devA in B>>B.txt
If devB checks the devA's work, he will detect the conflict and resolve it appropriately:
He will remove the extra definition from B.txt and add it to K.txt (and then will go to devA and will tell him/her to STOP, merge his work, and go on in the right file!)