changeset 23774:b9537ee87961

namespaces: add method to return a list of nodes for a given name This is a helpful method that some extensions can make use of (e.g. for custom revsets); currently not used in core.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 15 Dec 2014 14:46:04 -0800
parents c517b97c7609
children 885c0290f7d5
files mercurial/namespaces.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/namespaces.py	Tue Oct 21 19:49:23 2014 -0700
+++ b/mercurial/namespaces.py	Mon Dec 15 14:46:04 2014 -0800
@@ -140,3 +140,10 @@
         """method that returns a (sorted) list of names in a namespace that
         match a given node"""
         return sorted(self.nodemap(repo, node))
+
+    def nodes(self, repo, name):
+        """method that returns a list of nodes in a namespace that
+        match a given name.
+
+        """
+        return sorted(self.namemap(repo, name))