Patchwork obsolete: remove unused _knownrevs function

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 21, 2015, 4:33 p.m.
Message ID <a88e581e0654d66c94f8.1442853227@mimosa>
Download mbox | patch
Permalink /patch/10555/
State Accepted
Headers show

Comments

Yuya Nishihara - Sept. 21, 2015, 4:33 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1442151298 -32400
#      Sun Sep 13 22:34:58 2015 +0900
# Node ID a88e581e0654d66c94f8469fdb468398d0f8c2c6
# Parent  4b685712fa454919c121d8d1c967da35b0522dd5
obsolete: remove unused _knownrevs function

The call site was removed at cd62532c62a1.
Augie Fackler - Sept. 22, 2015, 1:44 p.m.
On Tue, Sep 22, 2015 at 01:33:47AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1442151298 -32400
> #      Sun Sep 13 22:34:58 2015 +0900
> # Node ID a88e581e0654d66c94f8469fdb468398d0f8c2c6
> # Parent  4b685712fa454919c121d8d1c967da35b0522dd5
> obsolete: remove unused _knownrevs function

queued, many thanks

>
> The call site was removed at cd62532c62a1.
>
> diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
> --- a/mercurial/obsolete.py
> +++ b/mercurial/obsolete.py
> @@ -1045,16 +1045,6 @@ def successorssets(repo, initialnode, ca
>                  cache[current] = final
>      return cache[initialnode]
>
> -def _knownrevs(repo, nodes):
> -    """yield revision numbers of known nodes passed in parameters
> -
> -    Unknown revisions are silently ignored."""
> -    torev = repo.changelog.nodemap.get
> -    for n in nodes:
> -        rev = torev(n)
> -        if rev is not None:
> -            yield rev
> -
>  # mapping of 'set-name' -> <function to compute this set>
>  cachefuncs = {}
>  def cachefor(name):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -1045,16 +1045,6 @@  def successorssets(repo, initialnode, ca
                 cache[current] = final
     return cache[initialnode]
 
-def _knownrevs(repo, nodes):
-    """yield revision numbers of known nodes passed in parameters
-
-    Unknown revisions are silently ignored."""
-    torev = repo.changelog.nodemap.get
-    for n in nodes:
-        rev = torev(n)
-        if rev is not None:
-            yield rev
-
 # mapping of 'set-name' -> <function to compute this set>
 cachefuncs = {}
 def cachefor(name):