changeset 23716:f4828a8f6ae9

namespaces: copy implementation to new namespace object
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 19 Dec 2014 17:17:17 -0800
parents eee55c09010a
children d8663e6153c1
files mercurial/namespaces.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/namespaces.py	Fri Dec 19 17:00:28 2014 -0800
+++ b/mercurial/namespaces.py	Fri Dec 19 17:17:17 2014 -0800
@@ -147,3 +147,8 @@
         self.templatename = templatename
         self.namemap = namemap
         self.nodemap = nodemap
+
+    def names(self, repo, node):
+        """method that returns a (sorted) list of names in a namespace that
+        match a given node"""
+        return sorted(self.nodemap(repo, node))