merge and left most parent

John Arbash Meinel john at arbash-meinel.com
Fri Jan 8 15:49:03 GMT 2010


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

John Szakmeister wrote:
> On Fri, Jan 8, 2010 at 4:50 AM, Alexander Belchenko <bialix at ukr.net> wrote:
>> INADA Naoki пишет:
>>> IIRC, to create such a history, person should branch another
>>> trunk-mirror branch and
>>> merge from trunk-mirror.
>>> Does bazaar offer an option that selects remote rivision as a main parent
>>> of
>>> merging revision? Or are there any way to create 3' history without
>>> trunk-mirror?
>> I don't know any read-to-use way to achieve this other than using bound
>> branch (heavyweight checkout). But this problem was discussed in the past
>> and AFAIK there is desire to have "land" command to achieve what you want. I
>> think it should not be too hard to implement in a plugin.
> 
> I *really* like the idea of having a "land" command.
> 
> -John
> 
> 

One option was to have "bzr merge --swap-parents" which would merge
trunk, and then make the 'trunk' revision the left-hand parent.

Another useful bit is "append_revisions_only=True" in branch.conf on the
 trunk branch. If that is present, then "bzr push" in the original
description will fail, forcing users to land code the other way.

The hackish way of getting "bzr merge --swap-parents" without having a
separate branch is:

1) bzr revision-info -r -1 # note the revision-id
2) bzr pull --overwrite $TRUNK
3) bzr merge . -r revid:$REVID
4) bzr commit -m "land my code into trunk"
5) bzr push $TRUNK

Note that some sort of 'land' command could be easily provided by a
plugin. I would probably hesitate to add it to bzr's core set until it
had some time vetting in a plugin.

I think having the ability to swap parents (possibly after the merge has
been done) is a useful feature on its own, though.

John
=:->


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktHU+8ACgkQJdeBCYSNAAMuLgCfcHH52j3GDsK3h6mbOEOq3LBY
kR0An35fiSt+U/wU9ZHiqk9uFpuGgAyC
=cg/2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list