I'm working on implementing a clean way to resolve name conflicts. The use case is that a file with the same name is added on two different heads (or branches), and then the heads are merged (or the branches propagated).
There are two possible resolutions; the files should be "sutured" into one file, or the files should be renamed to different files. Currently, "suturing" is not supported, so we approximate it by dropping one file, and manually merging its content with the other file. Renaming is currently supported. To implement this cleanly, I'd like to add support for these two resolutions in 'merge'. See http://lists.gnu.org/archive/html/monotone-devel/2008-04/msg00084.html for a little more discussion. This is also following up to the discussion in http://lists.gnu.org/archive/html/monotone-devel/2008-02/msg00141.html I can see how to allow merge to drop files; just call code from the 'drop' command. However, that appears to be quite a bit of detailed work. At a minimum, it requires preparing at least one more roster to allow commiting the drop before proceeding with the merge. So perhaps it would be better to implement file suturing now. I searched the mailing list archives for suturing. Nathaniel outlines the basic objection to it here: http://lists.gnu.org/archive/html/monotone-devel/2005-05/msg00326.html The problem use case is: A B / \ /| | X | | / \| | C D |/ E Suppose A has "add foo", B has "add foo", D is a simple merge, so D contains a single sutured file name "foo". Suppose also that C has "rename foo bar", and E is a simple merge, so E has two files "foo" and "bar". In pratice, what this means is one developer has decided to resolve the conflict via renames (deciding the files should be separate), while another developer has decided to suture the files (deciding they should be the same). Clearly one of these approaches is simply wrong, and should be reverted. There are similar problem cases where developers do bad things after a suture; they have similar resolutions (tell the developers not to do bad things :). So I believe supporting file suturing would be a good thing in practice. It would remove one of the impediments to people adopting monotone. People can abuse it and cause more problems, but on balance it will be good. However, I don't see anything in the mailing list about how to actually implement suturing. So I can't tell which is the best way to proceed. -- -- Stephe _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel