Discussion about merging
John A Meinel
john at arbash-meinel.com
Tue Jun 7 17:24:31 BST 2005
Erik Bågfors wrote:
>>I don't know if merge will properly merge ancestry for you. As I think
>>the interior revision-id will be different. However, because of the
>>unique identifiers, you can actually undo one of the commits, merge the
>>other commit, and then replay the original commit. Then just replay that
>>last commit on the other branch, and they are back to having identical
> This is one of the things I would LOVE to see. This would allow me to
> just hack in one branch, commit, pull, keep hacking, etc. This is one
> of the things that makes darcs to user friendly.
> However, I don't quite understand how you should solve conflicts in this case.
> undo one commit (or several),
> pull from upstream,
> try replay the commit, gives conflict, solve conflict, keep replaying
> (ie, commit).
> I don't understand how that last line would be done
The real trick is that the original multi-commit undo needs to back up
until the greatest common ancestor of the trees. So that you know you
can replay the other branch without having any conflicts. (If they
committed over there, they will commit over here).
For the final redo, I think conflicts need to happen just like any other
merge type of conflict. You replay one at a time, such that each
snapshot gets a new base, and if you get a conflict you stop, report it,
and let the user fix it. Then you can keep redoing the changes.
At least that would be my best guess as to what you should do.
Remember, the reason darcs can get away with this is that it destroys
history. You don't know what was committed when with this method, so be
careful. Often you don't really care about exact history. But you if you
maintain "release" branches, you probably wouldn't want to use these
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 251 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050607/2c3a5bb0/attachment.pgp
More information about the bazaar