[bug] Branch.open_containing refuses to open URLs
Robert Collins
robertc at robertcollins.net
Wed Jan 11 22:07:55 GMT 2006
On Wed, 2006-01-11 at 16:02 +1100, Martin Pool wrote:
> Branch.open_containing has this code, apparently from Robert:
>
> @staticmethod
> def open_containing(path=None):
> """Open an existing working tree which has its root about path.
>
> This probes for a working tree at path and searches upwards from
> there.
>
> Basically we keep looking up until we find the control directory
> or
> run into /. If there isn't one, raises NotBranchError.
> TODO: give this a new exception.
> If there is one, it is returned, along with the unused portion
> of path.
> """
> if path is None:
> path = getcwd()
> else:
> # sanity check.
> if path.find('://') != -1:
> raise NotBranchError(path=path)
>
> The exception means that you cannot, for example, run diff against a
> remote repository.
Is this WorkingTree.open_containing or Branch.open_containing ?
WorkingTree should be like that, Branch should not.
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060112/009e014e/attachment.pgp
More information about the bazaar
mailing list