[MERGE] Add debugging flag for merges

John Arbash Meinel john at arbash-meinel.com
Fri Dec 7 02:34:48 GMT 2007


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

Aaron Bentley wrote:
> 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

It seems a little odd to have this as a debug flag, rather than doing it as an
alternate merge type.

But I guess you needed it that way, so you could debug any merge type.


Weird, my messages got split between 2 email. Still:

BB:approve

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHWLFIJdeBCYSNAAMRAgotAKCgR5ACSeNiIsUuqf80zOQzn0pKFACggnN0
tIg0DMZVanTVty4gOCzwvgc=
=XDPt
-----END PGP SIGNATURE-----



More information about the bazaar mailing list