[MERGE] Exception when pulling from a location

John Arbash Meinel john at arbash-meinel.com
Mon Feb 9 19:39:49 GMT 2009


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

Aaron Bentley wrote:
> bb:comment
> 
> John Arbash Meinel wrote:
>> We have a small bug in how 'bzr pull XXX' works. Basically, the first
>> thing we do is check to see if it is a 'mergeable' (aka bundle), and
>> then if we find it is not, we then switch and try it as a branch.
> 
> I don't understand what bug you're talking about.

> 
>> Anyway, the specific bugs I'm fixing here is:
> 
>> 1) We were checking if, filename.endswith('/'), but because of how
>> Transport.relpath is implemented, that will never be true. The original
>> check was meant to be that you could use "bzr pull ../foo/" and we would
>> know it wasn't a file, but a directory, so I switched that around.
> 
> Cool.  (Though I guess URLs ending in slashes *could* be merge directives.)
> 
>> 2) When the connection failed, we would raise a ConnectionError, but
>> this was being trapped and raised as a NotABundle. Which wasn't a big
>> problem, except a side effect of "read_mergeable_from_url" is to
>> populate the "possible_transports" list with a new entry for the
>> transport it used to read the bundle.
> 
>> Which meant that if we got an abort on the connection, we would still
>> attempt to re-use the connection to do a later Branch.open()
> 
> I consider this entirely reasonable.  The transport should be worrying
> about disconnections, not the calling code.
> 
>> So this patch is just about not translating the connection failure into
>> a NotABundle, and just letting it propagate normally.
> 
> What happens then?
> 
> Aaron

We get a proper "could not connect" message to the user.

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

iEYEARECAAYFAkmQhoUACgkQJdeBCYSNAAPP3ACgxuhzdf79m0WKtawoFDBJZFTX
nQ8Ani1NT4V8OnKG2bbFnlxZay5wYOuI
=20uo
-----END PGP SIGNATURE-----



More information about the bazaar mailing list