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

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Sat Mar 12 12:13:58 CST 2011


On Sat, Mar 12, 2011 at 7:11 PM, Benoit Boissinot <bboissin at gmail.com> 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 tried this against a statichttprepo, and against hg 1.0, where it
worked. It was broken for hg 0.7, but then so it was w/o my patch
(because then both fetchcaps and between return a KeyError instead of
a RepoError).
-parren


More information about the Mercurial-devel mailing list