tree-less merges

Aaron Bentley aaron.bentley at utoronto.ca
Tue Nov 20 16:38:31 GMT 2007


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

Michael Hudson wrote:
> I have a need (for a submission script/pending reviews page; I guess
> send/bundle buggy could conceivably use something like this)

For send, it makes more sense to show what changes were performed,
because we don't know what the merge directive will ultimately be merged
into.  But for Bundle Buggy, there might be a place for it.

> I talked to John and Robert a bit about this in #bzr.  John suggested
> creating a LazyWorkingTree type (which had been my first thought too),
> but Robert (and Aaron overnight) suggested that subclassing Merger or
> TreeTransform might work better instead.  This makes sense to me, but
> both transform.py and merge.py make my head hurt[1], so I'd really
> appreciate a few hints as to where to start with this.

I'm always interested in ideas to make the interface clearer.  TT in
particular does not come off as friendly.

AIUI, you really care about conflicts, but I'm not clear whether you
care about all conflicts, or just text conflicts.

If it's just text conflicts, you can probably get away with subclassing
Merge3Merger.  If you want to predict content conflicts, naming
conflicts, etc, you'd have to subclass (or otherwise refactor) TT.

> It looks a bit to me that it will probably require changes to core
> bzr, afaict.

Well, if you subclass TT, you'll need a way to force Merge3Merge to use
your subclass.

> [1] For something very simple, the fact that there's no subclass
>    relationship between Merger and Merge3Merger is pretty confusing.
>    Should one of them be renamed?  Merger could become MergeDirector,
>    perhaps?

Yes, that might be an improvement.

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

iD8DBQFHQw2H0F+nu1YWqI0RAjKeAJ9wF+4jE6xGyB11EuCZeESCm//zLACfbmhy
p7+5nNWqPzWEgDTXjwdrXhI=
=tjUb
-----END PGP SIGNATURE-----



More information about the bazaar mailing list