[MERGE] Add debugging flag for merges

Aaron Bentley aaron.bentley at utoronto.ca
Thu Dec 6 18:12:28 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I tried merging my diff-missing fix into bzr.dev, but it was originally
against 1.0, so it turned out to be a criss-cross (which made me jump
:-).  So I did "merge --weave", and got conflicts in files I hadn't
modified.

This seemed strange to me, so  I forced it to emit the merge plans for
affected files.  That turned out to be very useful, so I'd like to add a
'merge' debug flag.  This will help me debug other peoples' problems
with annotate merge.

One fact that this experience really hammered home is that merging is
not cherry-picking.  When you merge, all differences between the two
trees are considered, not just the ones you caused.

I was surprised to get a conflict in pack_repo, but on investigation, I
can see that there really was a conflict:

 unchanged|        if not self.repo.is_locked():
     new-a|            import pdb;pdb.set_trace()
  killed-b|        assert self.repo.is_locked()
     new-b|            raise errors.ObjectNotLocked(self.repo)
 unchanged|        if self._names is None:

Martin and John had each added an "if not self.repo.is_locked"
condition, but they had added different ones.  Since no one had merged
1.0 and dev since then, I was left to resolve the conflict.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWDuL0F+nu1YWqI0RAjGaAJ4n+YVteCHts9Vx9dUngCde4InvewCgiXd5
JLQTFOTdSVLmq34y83p9dEY=
=nFi/
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dmerge.patch
Type: text/x-patch
Size: 5215 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071206/f5accc22/attachment.bin 


More information about the bazaar mailing list