Patchwork [2,of,2] revset: stop supporting plain list as input set (API)

login
register
mail settings
Submitter Yuya Nishihara
Date April 2, 2017, 2:29 p.m.
Message ID <3a4cc3a42efc903f0fd9.1491143397@mimosa>
Download mbox | patch
Permalink /patch/19907/
State Accepted
Headers show

Comments

Yuya Nishihara - April 2, 2017, 2:29 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1491138963 -32400
#      Sun Apr 02 22:16:03 2017 +0900
# Node ID 3a4cc3a42efc903f0fd900e9ec72444c1100c57b
# Parent  aaa6ee684fb9892dd89b65cb615c74cd3e2b615d
revset: stop supporting plain list as input set (API)

There was no deprecwarn(), but this is the same kind of API compatibility
as the one removed by the previous patch.
Augie Fackler - April 3, 2017, 8:15 p.m.
On Sun, Apr 02, 2017 at 11:29:57PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1491138963 -32400
> #      Sun Apr 02 22:16:03 2017 +0900
> # Node ID 3a4cc3a42efc903f0fd900e9ec72444c1100c57b
> # Parent  aaa6ee684fb9892dd89b65cb615c74cd3e2b615d
> revset: stop supporting plain list as input set (API)

queued, thanks

>
> There was no deprecwarn(), but this is the same kind of API compatibility
> as the one removed by the previous patch.
>
> diff --git a/mercurial/revset.py b/mercurial/revset.py
> --- a/mercurial/revset.py
> +++ b/mercurial/revset.py
> @@ -2254,11 +2254,7 @@ def makematcher(tree):
>      def mfunc(repo, subset=None):
>          if subset is None:
>              subset = fullreposet(repo)
> -        if util.safehasattr(subset, 'isascending'):
> -            result = getset(repo, subset, tree)
> -        else:
> -            result = getset(repo, baseset(subset), tree)
> -        return result
> +        return getset(repo, subset, tree)
>      return mfunc
>
>  def loadpredicate(ui, extname, registrarobj):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2254,11 +2254,7 @@  def makematcher(tree):
     def mfunc(repo, subset=None):
         if subset is None:
             subset = fullreposet(repo)
-        if util.safehasattr(subset, 'isascending'):
-            result = getset(repo, subset, tree)
-        else:
-            result = getset(repo, baseset(subset), tree)
-        return result
+        return getset(repo, subset, tree)
     return mfunc
 
 def loadpredicate(ui, extname, registrarobj):