[PATCH regression at default] statichttp: respect localrepo _restrictcapabilities

Durham Goode durham at fb.com
Tue Apr 8 15:07:08 CDT 2014


On 4/7/14, 12:57 PM, pierre-yves.david at ens-lyon.org wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at fb.com>
> # Date 1396896350 25200
> #      Mon Apr 07 11:45:50 2014 -0700
> # Node ID f5a95da9139f370e27aed1b2ec1e1b989899b8fd
> # Parent  12f161f08d744f0e4b6eef9c905670afb5c24dd4
> statichttp: respect localrepo _restrictcapabilities
>
> The static http repository was doing his own filtering of capability ignoring
> the filtering done in the local repo main class. This led to static http using
> the current draft of bundle2. We now apply both.
>
> diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
> --- a/mercurial/statichttprepo.py
> +++ b/mercurial/statichttprepo.py
> @@ -141,10 +141,11 @@ class statichttprepository(localrepo.loc
>           self._branchcaches = {}
>           self.encodepats = None
>           self.decodepats = None
>   
>       def _restrictcapabilities(self, caps):
> +        caps = super(statichttprepository, self)._restrictcapabilities(caps)
>           return caps.difference(["pushkey"])
>   
>       def url(self):
>           return self._url
>
Queued for default.  Also queued the trivial 
caps.remove()->caps.discard() fix in localrepo._restrictcapabilities 
that we discussed in person.


More information about the Mercurial-devel mailing list