[MERGE] Add BzrDir.get_branch_stacked_on_url

John Arbash Meinel john at arbash-meinel.com
Wed Sep 3 15:14:17 BST 2008


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

Jonathan Lange wrote:
...

>>> Well, I'm not opposed to this as a stop-gap as long as you file a bug
>>> that we shouldn't open fallback branches until we know that we need them.
>> stacked_on_branches are always needed today, for the repository, branch
>> history etc to operate correctly. The repository has no way to call-back
>> to the branch to ask for other locations, and I'm not sure that would be
>> a good way to construct it anyhow.
>>
>>> The patch as it stands assumes too much about the way branches are
>>> configured.  This would fail spectacularly with a Subversion branch, if
>>> they supported stacking.
>> I agree that the BzrDirMetaDir implementation should indirect through
>> the format object of the branch though I will note that bzr-svn branches
>> are not a problem: subversion branches have their own BzrDir
>> implementation which means they already have an indirection point.
>>
> 
> Here's a new patch that does this.
> 
> I hope it satisfies.
> 
> jml

So IMO, this should follow the same format as "get_bound_location()" and other
such lookup functions. And return None when it isn't stacked rather than
raising an exception.

I can understand raising an exception if you were opening the branch itself,
but as you are just looking for a string, which doesn't exist 95% of the time,
I think it is bad practice to raise an exception.

I know I'm coming late to the discussion, though.

Also, do you need this for 1.7 for any reason? I'd like to postpone it (as it
is an API change during feature freeze), but you might be able to convince me
otherwise.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIvpu5JdeBCYSNAAMRAlFLAJ9hqfqzdqDNiT04fCwLPO1dOB6M5wCfW9Fk
dvS09/b8Zw2OYsGnlcFgYTQ=
=uHUx
-----END PGP SIGNATURE-----



More information about the bazaar mailing list