[MERGE] bzr+http:// should always try POSTing to the same location, not lots of child locations.
Andrew Bennetts
andrew at canonical.com
Thu Feb 1 06:03:33 GMT 2007
John Arbash Meinel wrote:
> John Arbash Meinel has voted +1 (conditional).
> Status is now: Conditionally approved
> Comment:
> I think you need a little bit more info in the NEWS entry, to describe
> the updates to the smart server.
>
> Why do you need to normalize_url() after doing a join()? At least in
> theory join() should have already normalized the path.
As you say, "in theory" :)
Rather than think about theory, I just call normalize_url and stop worrying!
Why be clever when I can be dumb? :)
> Even more, though, it seems like a lot of overhead to do this for every
> _remote_path() call. Couldn't you just cache the difference between
> self._http_transport.base and self.base during clone()/__init__(), and
> then you can just do:
>
> def __init__():
> ...
> self._offset_from_http = urlutils.relative_url(base, http_url)
>
> ...
>
> def _remote_path(self, relpath):
> return urlutils.join(self._offset_from_http, relpath)
>
> Since _remote_path is called for *every* action on Transport, it seems
> reasonable to try and keep it from having a large overhead.
I guess, although my intuition is that this is not going to be noticeable beside
the cost of issuing and waiting for an HTTP request.
> I also wonder if it is possible to find a good time to unescape the url
> characters, rather than doing it all the time.
Yeah, I know what you mean. I don't have the enthusiasm to tackle that issue
right now though.
> Regardless, though, I'm happy with how the patch is shaping up. And if
> you can either defend your method or clean it up, I'm happy to see it
> merged.
Thanks. I want to make Aaron happy before I merge it, as much as I'd like to
see it merged. He asks tough (but fair) questions.
-Andrew.
More information about the bazaar
mailing list