[MERGE] Exception when pulling from a location

Aaron Bentley aaron at aaronbentley.com
Mon Feb 9 19:29:53 GMT 2009


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

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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmQhC4ACgkQ0F+nu1YWqI2aYACfUclArlzi/XnXnHl61vmMd275
Li4AnRNMTh3l7e0kdGJYAYBLqm+D777y
=Takk
-----END PGP SIGNATURE-----



More information about the bazaar mailing list