Patchwork [5,of,5] scmutil: remove deprecated revpairnodes method

login
register
mail settings
Submitter Augie Fackler
Date May 11, 2018, 4:55 a.m.
Message ID <165ecca86b4a0dfe491a.1526014528@imladris.local>
Download mbox | patch
Permalink /patch/31490/
State Accepted
Headers show

Comments

Augie Fackler - May 11, 2018, 4:55 a.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1526014501 14400
#      Fri May 11 00:55:01 2018 -0400
# Node ID 165ecca86b4a0dfe491a8b306171bcc043f6d043
# Parent  35f66e1fc5a74a8009a8598c95178c9f6028ae66
scmutil: remove deprecated revpairnodes method
Augie Fackler - May 11, 2018, 4:57 a.m.
This series takes care of all our deprecated methods except three in templatekw, where I wasn’t sure if the whole method should be put out to pasture or just the support for passing `ui` into it. I suspect the former?

> On May 11, 2018, at 12:55 AM, Augie Fackler <raf@durin42.com> wrote:
> 
> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1526014501 14400
> #      Fri May 11 00:55:01 2018 -0400
> # Node ID 165ecca86b4a0dfe491a8b306171bcc043f6d043
> # Parent  35f66e1fc5a74a8009a8598c95178c9f6028ae66
> scmutil: remove deprecated revpairnodes method
> 
> diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
> --- a/mercurial/scmutil.py
> +++ b/mercurial/scmutil.py
> @@ -565,11 +565,6 @@ def _pairspec(revspec):
>     tree = revsetlang.parse(revspec)
>     return tree and tree[0] in ('range', 'rangepre', 'rangepost', 'rangeall')
> 
> -def revpairnodes(repo, revs):
> -    repo.ui.deprecwarn("revpairnodes is deprecated, please use revpair", "4.6")
> -    ctx1, ctx2 = revpair(repo, revs)
> -    return ctx1.node(), ctx2.node()
> -
> def revpair(repo, revs):
>     if not revs:
>         return repo['.'], repo[None]
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Yuya Nishihara - May 11, 2018, 12:22 p.m.
On Fri, 11 May 2018 00:57:28 -0400, Augie Fackler wrote:
> > On May 11, 2018, at 12:55 AM, Augie Fackler <raf@durin42.com> wrote:
> > 
> > # HG changeset patch
> > # User Augie Fackler <augie@google.com>
> > # Date 1526014501 14400
> > #      Fri May 11 00:55:01 2018 -0400
> > # Node ID 165ecca86b4a0dfe491a8b306171bcc043f6d043
> > # Parent  35f66e1fc5a74a8009a8598c95178c9f6028ae66
> > scmutil: remove deprecated revpairnodes method

Flagged as (API) and queued these, thanks.

> This series takes care of all our deprecated methods except three in
> templatekw, where I wasn’t sure if the whole method should be put out
> to pasture or just the support for passing `ui` into it. I suspect the former?

I'll take a look. The whole function should be removed.

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -565,11 +565,6 @@  def _pairspec(revspec):
     tree = revsetlang.parse(revspec)
     return tree and tree[0] in ('range', 'rangepre', 'rangepost', 'rangeall')
 
-def revpairnodes(repo, revs):
-    repo.ui.deprecwarn("revpairnodes is deprecated, please use revpair", "4.6")
-    ctx1, ctx2 = revpair(repo, revs)
-    return ctx1.node(), ctx2.node()
-
 def revpair(repo, revs):
     if not revs:
         return repo['.'], repo[None]