[PATCH] httprepo: use caps instead of between for compat check

Matt Mackall mpm at selenic.com
Sat Mar 12 12:19:22 CST 2011


On Sat, 2011-03-12 at 19:17 +0100, Benoit Boissinot wrote:
> On Sat, Mar 12, 2011 at 7:15 PM, Matt Mackall <mpm at selenic.com> wrote:
> > On Sat, 2011-03-12 at 19:11 +0100, Benoit Boissinot wrote:
> >> On Sat, Mar 12, 2011 at 6:58 PM, Matt Mackall <mpm at selenic.com> wrote:
> >> > On Sat, 2011-03-12 at 18:30 +0100, Peter Arrenbrecht wrote:
> >> >> # HG changeset patch
> >> >> # User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
> >> >> # Date 1299950942 -3600
> >> >> httprepo: use caps instead of between for compat check
> >> >
> >> > I'm sure this breaks compatibility with some old servers, but I'm not
> >> > sure how old.
> >>
> >> I think it is fine.
> >>
> >> before the change:
> >> static-http: raises RepoError on between()
> >> pre-capable http: raise RepoError on get_caps(), sets capabilities to
> >> the empty set
> >>
> >> after the change:
> >> static-http: raises RepoError on fetchcaps() and raises RepoError on between()
> >> pre-capable http: raise RepoError on get_caps(), is fine with between()
> >
> > I think ssh is the problem.
> >
> > between is a command known to all servers, thus it helps us synchronize
> > with the ssh stream and ignore any possible shell garbage at the
> > beginning of the stream.
> >
> 
> But in this case we are pre-unified protocol, this is during the
> server initialization (where we decide to fallback to static-http if
> needed).
> 
> cheers,
> 
> Benoit

Fair enough.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list