[MERGE] HTTP redirection
Aaron Bentley
aaron.bentley at utoronto.ca
Sun Mar 11 14:56:09 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
+1
Vincent Ladeuil wrote:
>>>>>> "aaron" == Aaron Bentley <aaron.bentley at utoronto.ca> writes:
>
> <snip/>
>
> >> The previous implementation leaved the BzrDir4,5&6 handle
> >> redirections silently as before.
>
> aaron> As I understood it, no redirections are ever being
> aaron> handled silently anymore.
>
> I said *previous*. The *previous* implementation handled
> redirections silently *except* for BzrDirFormat1.
I thought you were referring to your previous merge request.
> aaron> Further, I think that if any control directory's
> aaron> find_format method raises a RedirectRested,
> aaron> redirecting is the only reasonable choice. A control
> aaron> dir that does not want this processing should handle
> aaron> the redirect in find_format.
> >>
> >> You cannot redefine find_format in a daughter class. Well, you
> >> can, it will just be never called (that's precisely the point a
> >> registering the concrete class).
>
> aaron> Okay, so it's probe_transport where they would need to
> aaron> handle a redirect differently.
>
> Except that probe_transport returns a format and do not provide a
> mean to change the transport, hence open_from_transport should
> catch the exception and change the transport.
Right. My point was that if control directory formats *don't* want that
processing, they have ways of getting different behavior, e.g. raising a
different exception from probe_transport. So redirecting as a default
behavior is completely justified, IMHO.
> >> @@ -226,12 +226,13 @@
> >> code, response_file = self._get(relpath, None)
> >> return response_file
> >>
> >> - def _get(self, relpath, ranges):
> >> + def _get(self, relpath, ranges, tail_amount=0):
> >> """Get a file, or part of a file.
> >>
> >> :param relpath: Path relative to transport base URL
> >> - :param byte_range: None to get the whole file;
> >> - or [(start,end)] to fetch parts of a file.
> >> + :param ranges: None to get the whole file;
> >> + or [(start,end)+], a list of tuples to fetch parts of a file.
> >> + :param tail_amount: to fetch that amount from file tail.
>
> aaron> This documentation doesn't clarify what tail_amount is, to me.
I still don't know what a file tail is, but oh well.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF9BiJ0F+nu1YWqI0RAgGbAJ4goN8fZ19c/7OJvZWUypPfKyVraQCff0/s
Kvir05DnmdFOrWqxO+jNXXY=
=m9ZT
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list