notes on applying a merge changeset

John A Meinel john at arbash-meinel.com
Thu Dec 29 03:03:33 GMT 2005


Denys Duchier wrote:
> John A Meinel <john at arbash-meinel.com> writes:
> 
>> Well, currently 'bzr revert' is implemented using the merge code. Which
>> means that it *has* to support uncommitted changes. Since at the least
>> in needs to be able to remove them. :)
> 
> The only extent to which it supports uncommited changes is precisely
> that it forgets them and replaces them by the versions recorded in the
> basis tree.
> 
> Cheers,
> 
> --Denys

Is there some other code that you are thinking about? Because I just
tested 'bzr merge'. Here is the test case:

$ mkdir a
$ bzr init a
$ cd a
$ echo -e "some text\nand then some more\nand a little bit more" > a
$ bzr add
added a
$ bzr commit -m 'begin'
Committed revision 1.
$ cd ..
$ bzr branch a b
Branched 1 revision(s).

$ cd a
$ echo -e "some text\nearly change\nand then some more\nand a little bit
more" > a
$ bzr commit -m "change"
Committed revision 2.
$ cd ../b
$ echo "change at the end" >> a
$ bzr merge --force ../a
All changes applied successfully.

$ cat a
some text
early change
and then some more
and a little bit more
change at the end


You can see, when all is done, the 'early change' exists in a, as does
the 'change at the end' which existed in b, but had not been committed.


Or for simplified cut and pasting to test yourself:
mkdir a
bzr init a
cd a
echo -e "some text\nand then some more\nand a little bit more" > a
bzr add
bzr commit -m 'begin'
cd ..
bzr branch a b
cd a
echo -e "some text\nearly change\nand then some more\nand a little bit
more" > a
bzr commit -m "change"
cd ../b
echo "change at the end" >> a
bzr merge --force ../a
cat a

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051228/2cf53bfb/attachment.pgp 


More information about the bazaar mailing list