http:// transport should transparently check for smart server and use it if present

Bug #132643 reported by Andrew Cowie
2
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Andrew Bennetts

Bug Description

It would be really cool if doing a bzr clone http://www.example.com/bzr/project/branch would check to see if the the smart server is present (ie via mod_python and mod_rewrite) and if so, use it transparently.

I realize that this means one or two extra requests, the POST to .bzr/smart or whatever. Checking out my project via http:// takes 22 minutes due to the 600-odd round trips necessary to fetch the knits (sic) one by one. I would respectfully suggest that the cost of two additional round trips for benefit of potentially locating an active smart server and subsequent firehose return of a single on-the-spot pack (sic) thereby reducing initial checkout time to the order of 1.5 minutes would be two round trips well invested.

As of bzr 0.18 the client does not do this even though people in #bzr seemed to expect that it would. Given the proliferation of http:// as the URL publicly advertised via a project's website (or even more importantly, previously used and now cached as the remembered branch URL), using the smart server transparently seems like a worthy thing to do.

AfC

Aaron Bentley (abentley)
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Andrew Bennetts (spiv) wrote :

I believe this was fixed several releases ago. Apologies for not updating the bug sooner!

In the code, RemoteBzrDirFormat is in the list of formats to try when opening a URL. If the transport is HTTP, RemoteBzrDirFormat's probe_transport method will try a test smart request (the 'hello' request) to determine if there's a smart server at that URL. If there is, then bzr should use RemoteBzrDirFormat for that location. So the end result is that bzr should now automatically use smart requests if http:// transport supports them.

Feel free to reopen or file a new bug if this still isn't working for you.

Changed in bzr:
assignee: nobody → spiv
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.