Patchwork [1,of,2,evolve-ext] evolve: use new api _callcompressable

login
register
mail settings
Submitter Olle Lundberg
Date April 12, 2014, 9:17 p.m.
Message ID <cc5cea70ba8c591b6218.1397337457@se-c02kq0dadr55.lan>
Download mbox | patch
Permalink /patch/4297/
State Not Applicable
Headers show

Comments

Olle Lundberg - April 12, 2014, 9:17 p.m.
# HG changeset patch
# User Olle Lundberg <geek@nerd.sh>
# Date 1397337313 -7200
#      Sat Apr 12 23:15:13 2014 +0200
# Node ID cc5cea70ba8c591b62188585433f626034b12970
# Parent  484886a2712d35e86391c8d7c289b26d6575be64
evolve: use new api _callcompressable

This changeset makes evolve compatible with the change introduced in
167047ba3cfa
Pierre-Yves David - April 13, 2014, 4:22 a.m.
On 04/12/2014 05:17 PM, Olle Lundberg wrote:
> # HG changeset patch
> # User Olle Lundberg <geek@nerd.sh>
> # Date 1397337313 -7200
> #      Sat Apr 12 23:15:13 2014 +0200
> # Node ID cc5cea70ba8c591b62188585433f626034b12970
> # Parent  484886a2712d35e86391c8d7c289b26d6575be64
> evolve: use new api _callcompressable
>
> This changeset makes evolve compatible with the change introduced in
> 167047ba3cfa
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -2345,12 +2345,11 @@
>       opts = {}
>       if heads is not None:
>           opts['heads'] = wireproto.encodelist(heads)
>       if common is not None:
>           opts['common'] = wireproto.encodelist(common)
> -    f = self._callstream("evoext_pullobsmarkers_0", **opts)
> -    f = self._decompress(f)
> +    f = self._callcompressable("evoext_pullobsmarkers_0", **opts)

You have to make sure it is compatible with older version of mercurial too.

mercurial.util.safehasattr is your chum here.
Olle Lundberg - April 13, 2014, 12:46 p.m.
On Sun, Apr 13, 2014 at 6:22 AM, Pierre-Yves David <
pierre-yves.david@ens-lyon.org> wrote:

>
>
> On 04/12/2014 05:17 PM, Olle Lundberg wrote:
>
>> # HG changeset patch
>> # User Olle Lundberg <geek@nerd.sh>
>> # Date 1397337313 -7200
>> #      Sat Apr 12 23:15:13 2014 +0200
>> # Node ID cc5cea70ba8c591b62188585433f626034b12970
>> # Parent  484886a2712d35e86391c8d7c289b26d6575be64
>> evolve: use new api _callcompressable
>>
>> This changeset makes evolve compatible with the change introduced in
>> 167047ba3cfa
>>
>> diff --git a/hgext/evolve.py b/hgext/evolve.py
>> --- a/hgext/evolve.py
>> +++ b/hgext/evolve.py
>> @@ -2345,12 +2345,11 @@
>>       opts = {}
>>       if heads is not None:
>>           opts['heads'] = wireproto.encodelist(heads)
>>       if common is not None:
>>           opts['common'] = wireproto.encodelist(common)
>> -    f = self._callstream("evoext_pullobsmarkers_0", **opts)
>> -    f = self._decompress(f)
>> +    f = self._callcompressable("evoext_pullobsmarkers_0", **opts)
>>
>
> You have to make sure it is compatible with older version of mercurial too.
>
Sure thing, I was just under the impression that evolve default was more or
less for hg default and the same with the stable branch.
I have pushed the fix to my bitbucket repo and will resend.

>
> mercurial.util.safehasattr is your chum here.
>
> --
> Pierre-Yves
>

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -2345,12 +2345,11 @@ 
     opts = {}
     if heads is not None:
         opts['heads'] = wireproto.encodelist(heads)
     if common is not None:
         opts['common'] = wireproto.encodelist(common)
-    f = self._callstream("evoext_pullobsmarkers_0", **opts)
-    f = self._decompress(f)
+    f = self._callcompressable("evoext_pullobsmarkers_0", **opts)
     length= int(f.read(20))
     chunk = 4096
     current = 0
     data = StringIO()
     ui = self.ui