[MERGE] bzr+http:// should always try POSTing to the same location, not lots of child locations.

John Arbash Meinel john at arbash-meinel.com
Thu Jan 4 18:32:54 GMT 2007


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.

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 also wonder if it is possible to find a good time to unescape the url 
characters, rather than doing it all the time.

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.


For details, see: 
http://bundlebuggy.aaronbentley.com/request/%3C20070104062000.GE5903%40steerpike.home.puzzling.org%3E



More information about the bazaar mailing list