Patchwork [STABLE] revlog: fix descendant deprecated method

login
register
mail settings
Submitter Boris Feld
Date Aug. 1, 2018, 8:29 a.m.
Message ID <0f5d9a95a80508a19a30.1533112180@FB-lair>
Download mbox | patch
Permalink /patch/32986/
State Accepted
Headers show

Comments

Boris Feld - Aug. 1, 2018, 8:29 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1533111828 -7200
#      Wed Aug 01 10:23:48 2018 +0200
# Branch stable
# Node ID 0f5d9a95a80508a19a30a78cb49b0fb3c86e6831
# Parent  fe3ca1e6f786c1ea8eadf8cff9057095dbb2d463
# EXP-Topic deprecate-descendant
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0f5d9a95a805
revlog: fix descendant deprecated method

Fix the descendant deprecated method introduced earlier in this cycle.

This was catched by Yuya, thank you.
Yuya Nishihara - Aug. 1, 2018, 11:50 a.m.
On Wed, 01 Aug 2018 10:29:40 +0200, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld <boris.feld@octobus.net>
> # Date 1533111828 -7200
> #      Wed Aug 01 10:23:48 2018 +0200
> # Branch stable
> # Node ID 0f5d9a95a80508a19a30a78cb49b0fb3c86e6831
> # Parent  fe3ca1e6f786c1ea8eadf8cff9057095dbb2d463
> # EXP-Topic deprecate-descendant
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0f5d9a95a805
> revlog: fix descendant deprecated method

Queued for stable, thanks.

> diff --git a/tests/test-amend.t b/tests/test-amend.t
> --- a/tests/test-amend.t
> +++ b/tests/test-amend.t
> @@ -38,7 +38,7 @@ Basic amend
>    |  --- /dev/null
>    |  +++ b/B
>    |  @@ -0,0 +1,1 @@
> -  |  +B2
> +  |  +B3

Removed this.
Boris FELD - Aug. 1, 2018, 3:14 p.m.
On 01/08/2018 13:50, Yuya Nishihara wrote:
> On Wed, 01 Aug 2018 10:29:40 +0200, Boris Feld wrote:
>> # HG changeset patch
>> # User Boris Feld <boris.feld@octobus.net>
>> # Date 1533111828 -7200
>> #      Wed Aug 01 10:23:48 2018 +0200
>> # Branch stable
>> # Node ID 0f5d9a95a80508a19a30a78cb49b0fb3c86e6831
>> # Parent  fe3ca1e6f786c1ea8eadf8cff9057095dbb2d463
>> # EXP-Topic deprecate-descendant
>> # Available At https://bitbucket.org/octobus/mercurial-devel/
>> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 0f5d9a95a805
>> revlog: fix descendant deprecated method
> Queued for stable, thanks.
>
>> diff --git a/tests/test-amend.t b/tests/test-amend.t
>> --- a/tests/test-amend.t
>> +++ b/tests/test-amend.t
>> @@ -38,7 +38,7 @@ Basic amend
>>     |  --- /dev/null
>>     |  +++ b/B
>>     |  @@ -0,0 +1,1 @@
>> -  |  +B2
>> +  |  +B3
> Removed this.
Woops, sorry that was not meant to be part of the patch.

Patch

diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -1701,8 +1701,8 @@  class revlog(object):
         return self.isancestorrev(a, b)
 
     def descendant(self, a, b):
-        msg = (b'revlog.descendant is deprecated, use revlog.isancestorrev')
-        self._repo.ui.deprecwarn(msg, b'4.7')
+        msg = 'revlog.descendant is deprecated, use revlog.isancestorrev'
+        util.nouideprecwarn(msg, '4.7')
         return self.isancestorrev(a, b)
 
     def isancestorrev(self, a, b):
diff --git a/tests/test-amend.t b/tests/test-amend.t
--- a/tests/test-amend.t
+++ b/tests/test-amend.t
@@ -38,7 +38,7 @@  Basic amend
   |  --- /dev/null
   |  +++ b/B
   |  @@ -0,0 +1,1 @@
-  |  +B2
+  |  +B3
   |
   o  0 426bada5c675 A
      diff --git a/A b/A