Patchwork [6,of,7] obsolete: rename `allmarkers` to `getmarkers`

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 21, 2014, 3:20 a.m.
Message ID <fcc1638e9db4378096dd.1408591256@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5543/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 21, 2014, 3:20 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1408583483 25200
#      Wed Aug 20 18:11:23 2014 -0700
# Node ID fcc1638e9db4378096dd39499bfc8ff15166a994
# Parent  6aafbe6ac6d43e7e9eef1a12ca96c58489565b62
obsolete: rename `allmarkers` to `getmarkers`

This function is going to gain a "nodes" argument to filter the marker to the
ones relevant to <nodes> only.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2362,11 +2362,11 @@  def debugobsolete(ui, repo, precursor=No
             finally:
                 tr.release()
         finally:
             l.release()
     else:
-        for m in obsolete.allmarkers(repo):
+        for m in obsolete.getmarkers(repo):
             cmdutil.showmarker(ui, m)
 
 @command('debugpathcomplete',
          [('f', 'full', None, _('complete an entire path')),
           ('n', 'normal', None, _('show only normal files')),
diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -491,12 +491,12 @@  def pushmarker(repo, key, old, new):
         finally:
             tr.release()
     finally:
         lock.release()
 
-def allmarkers(repo):
-    """all obsolete markers known in a repository"""
+def getmarkers(repo):
+    """returns markers known in a repository"""
     for markerdata in repo.obsstore:
         yield marker(repo, markerdata)
 
 def precursormarkers(ctx):
     """obsolete marker marking this changeset as a successors"""