[merge] allow 'bzr branch' even if parent is not accessible
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 14 16:26:22 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
After the changes Larstiq and I did, to make .bzr/branch/parent a
relative path, it is possible to have paths that are not accessible or
valid from a different access mechanism.
Typically this manifests itself when someone does a local branch to a
publicly served location. So the relative path is their filesystem, and
only a portion of this is served by http.
Currently 'bzr branch' fails in the last few steps if you try and get a
copy of these branches.
The attached patch changes it, so that if a parent is not accessible, it
just returns None. It seemed the most reasonable thing to me. Though I
suppose the error could be caught, and raised as an
'InaccessibleParent', and then the higher level could catch that and
ignore it. But that seemed a little over engineered.
The mutter() is there so that there is at least a log of what happened.
I would consider upgrading it to a note or warning. But I don't think it
is really useful to the user. I don't think there is any code in bzr
that actually uses a remote branches parent. (other than
copy_content_into which copies it over). But 'bzr branch' actually sets
the parent when it is done, so the copying is actually bogus, we throw
it away right away. (There are other clone operations that may want it
preserved, though, so I didn't want to remove it entirely.)
Comments are welcome. I think something should go in for 0.9, since it
breaks when accessing peoples branches when it doesn't have to.
(Try getting Matthieu Moy's branches)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v184.108.40.206 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3032 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060714/37645a30/attachment.bin
More information about the bazaar