Bazaar still below the radar when evaluating VCS tools

Robert Collins robertc at robertcollins.net
Sat Feb 27 13:52:04 GMT 2010


On Sat, 2010-02-27 at 17:08 +0900, Stephen J. Turnbull wrote:
> 
> 
> Reverse cherry-picking is not what I'm talking about.  I want two
> commits coalesced, ie, the record of the earlier commit removed, but
> not the content.

One way [manual, automatable]: given commits 1, 2, 3, 4, 'hide' 2:

bzr branch r 1 source tmp
cd tmp
bzr bzr -r 3 $source; bzr commit -m message-of-three
bzr merge $source; commit -m message-of-four
bzr push $source

A default log of $source will show
message4
message3
orig1

And a verbose (-n0) log:
message4
  orig4
message3
  orig3
  orig2
orig1

Thats the history perserving way.

The history discarding way is:

bzr branch -r 1 $source tmp
cd tmp
bzr merge $source -r 3
bzr revert --forget-merges
bzr commit -m <message of 3>
bzr merge -r 3..4 $source
bzr commit -m <message of 4>
bzr push $source

Which is I think equivalent to what you sketched.

Cheers,
Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20100228/49e22f71/attachment.pgp 


More information about the bazaar mailing list