Switch to weave merge?

Aaron Bentley aaron.bentley at utoronto.ca
Fri May 26 15:38:10 BST 2006


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

John Arbash Meinel wrote:
> Aaron Bentley wrote:
> 
> 
>>Oh, one thing: only merge3 currently supports cherrypicking, though we
>>know how to add support to the other types.
>>
>>Aaron
> 
> 
> How would you cherrypick with weave/knit merge. Just constrain the
> deltas not to include ancestors not in the list, rather than all ancestry?

So when cherrypicking, there are a set of revisions that haven't been
seen by your branch, that you want to ignore.  I'm going to call them
'unwanted-new'.

So knit merge starts off with a two-way merge, and we get something like
this:

  My dog has
  <<<<<<< OTHER
b fleas
d and a bad attitude
e and sneakers
  =======
c interesting habits
f a skateboard
  >>>>>>> THIS

Now in the conflict regions, we determine why the two revisions differ:

Lets's say the ancestors of OTHER are (cfbde).  This means that
"interesting habits" and "a skateboard" were deleted by OTHER or one of
its ancestors, or else they would appear here.

Similarly, let's assume the ancestors of THIS are (cfb).  This means
that "and a bad attitude" and "and sneakers" are new lines introduced by
(de), and so should be retained.

So cherrypicking looks like it's just a matter of falsifying the list of
ancestors.  If we want to cherrypick 'e', we just need to add all
ancestors of 'e' to the ancestor list of THIS.

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

iD8DBQFEdxLS0F+nu1YWqI0RAjxXAJ9ZxN3djLaMQiqjOhm++OSM19McVgCeMsMd
eHydqwLKexkDN9FaaSGc9M8=
=LDrO
-----END PGP SIGNATURE-----




More information about the bazaar mailing list