[MERGE] Add BzrDir.get_branch_stacked_on_url

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


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

Aaron Bentley wrote:
> John Arbash Meinel wrote:
>> 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.
> 
> We've already shipped 1.6 with that as the API for
> Branch.get_stacked_on_url, so you're coming *very* late to this
> discussion.  I prefer to return None also, but Branch.get_stacked_on_url
> is already a public API.

Actually, I believe I raised the concern then as well. :)

> 
> We don't have to follow that pattern for
> BzrDir.get_branch_stacked_on_url, but I think consistency with
> Branch.get_stacked_on_url would make sense.
> 
> Alternatively, we could implement Branch.get_stacked_on_location and
> deprecate Branch.get_stacked_on_url.
> 
> Aaron

I'm not going to be very picky about it, I'll let whoever is writing the code
decide.

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

iD8DBQFIvrUNJdeBCYSNAAMRAjquAKCwpA7ZmzVklD1tJh5cm1SABLuizACgkDmp
NPkSH+NHC+p4taniGv4lgvo=
=1P0V
-----END PGP SIGNATURE-----



More information about the bazaar mailing list