[PATCH] wireproto: use base64 instead of hex for known/getbundle

Matt Mackall mpm at selenic.com
Tue May 3 09:27:33 CDT 2011


On Tue, 2011-05-03 at 15:12 +0200, Sune Foldager wrote:
> On Tue, May 03, 2011 at 08:02:31 -0500, Augie Fackler wrote:
> >On May 3, 2011, at 3:31 AM, Sune Foldager wrote:
> >>
> >> I agree; I don't think we should do this and lose the ability to see the nodes.
> >> (On the other hand, it's not so easy to see the nodes anymore, when they are
> >> in HTTP headers, but it can be done.)
> >
> >I was actually going to ask if we could leave the arguments in the GET line if the resulting request line would be < 512 bytes (or some other arbitrary but reasonable value.) Would anyone object to such a tweak?
> 
> I suggested it to Matt at the sprint, but it seems he forgot (or silently disagreed ;-)); I'd like that too, to ease debugging. In fact something like this should do it:
> 
> (ALTHOUGH TESTS ARE NOT UPDATED, SO DON'T PUSH :p)
> 
> # HG changeset patch
> # User Sune Foldager <cryo at cyanite.org>
> # Date 1304428122 -7200
> # Node ID 0cbcb62dd7679e2f8577679775c52ff79709b446
> # Parent  d8ba6fb2ce15add4937ce9c3710e8dbd99648818
> httprepo: only activate longargs for >512 byte arguments
> 
> diff -r d8ba6fb2ce15 -r 0cbcb62dd767 mercurial/httprepo.py
> --- a/mercurial/httprepo.py     Sun May 01 13:08:29 2011 -0500
> +++ b/mercurial/httprepo.py     Tue May 03 15:08:42 2011 +0200
> @@ -78,7 +78,7 @@
>           self.ui.debug("sending %s command\n" % cmd)
>           q = [('cmd', cmd)]
>           headersize = 0
> -        if len(args) > 0:
> +        if len(args) > 512:
>               httpheader = self.capable('httpheader')
>               if httpheader:
>                   headersize = int(httpheader.split(',')[0])

My concern here is that we want to make sure the new mode is heavily
field-tested. If it only triggers for pathological cases, that won't
happen.

Perhaps we should be talking in terms of a potentially optional way to
dump the extra args to Apache/IIS logs.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list