Patchwork [3,of,4] namespaces: remove names method on the namespaces object

login
register
mail settings
Submitter Sean Farley
Date Jan. 2, 2015, 11:42 p.m.
Message ID <be5de72834c153d850c1.1420242124@laptop.local>
Download mbox | patch
Permalink /patch/7305/
State Accepted
Commit 3436e45de2fbff5a4d3c5aec6b4cfd7928438171
Headers show

Comments

Sean Farley - Jan. 2, 2015, 11:42 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1419199460 28800
#      Sun Dec 21 14:04:20 2014 -0800
# Node ID be5de72834c153d850c1e9c33aeb3cc26db5f088
# Parent  13a462c900a74cae0973571857f455c7dd54d0c0
namespaces: remove names method on the namespaces object

Now that there is an object for each individual namespace, we use that instead
of the method on the collection of namespaces.

Patch

diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py
--- a/mercurial/namespaces.py
+++ b/mercurial/namespaces.py
@@ -87,15 +87,10 @@  class namespaces(object):
 
     def templatename(self, namespace):
         """method that returns the template name of a namespace"""
         return self._names[namespace].templatename
 
-    def names(self, repo, namespace, node):
-        """method that returns a (sorted) list of names in a namespace that
-        match a given node"""
-        return sorted(self._names[namespace].nodemap(repo, node))
-
 class namespace(object):
     """provides an interface to a namespace
 
     Namespaces are basically generic many-to-many mapping between some
     (namespaced) names and nodes. The goal here is to control the pollution of