bzr merge NON-EXISTENT-RELPATH

John Arbash Meinel john at arbash-meinel.com
Thu Apr 14 17:37:20 UTC 2011


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

On 4/14/2011 6:37 PM, Denys Duchier wrote:
> One of my students made a typo and we discovered that:
> 
>     bzr merge A/B/C
> 
> where A/B/C does not exists, simply prints "nothing to do" instead of
> complaining that A/B/C does not exist.
> 
> This is because of the Branch.open_containing in _get_merger_from_branch
> opening the current branch (defaulting to local transport).
> 
> Why are we using open_containing here?  does it make sense?
> 
> Cheers,
> 
> --Denys
> 

You can do:

 bzr merge ../other/tree/just/one/file

And only merge the changes to that file, without merging the rest of
'other/tree'.

It is a bit odd that:

 bzr merge just/one/file

Thinks you want to merge the changes from the current tree into itself.
I think it would be reasonable to check if target_tree == this_tree and
do something special there.

But yes, open_containing is completely intentional and desired behavior.

John
=:->

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

iEYEARECAAYFAk2nMNAACgkQJdeBCYSNAAPnhwCggO6RVlh4qLKh2ioNa0orfZZY
miQAoM93tmfdDMBAdN6eNt3s18nT1vVf
=K9V4
-----END PGP SIGNATURE-----



More information about the bazaar mailing list