# HG changeset patch # User Sean Farley # Date 2014-12-20 01:17:17 # Node ID f4828a8f6ae9326b6a0dd52c1699f369f7b759f5 # Parent eee55c09010ac838ecb693f80b56f2531cd58f01 namespaces: copy implementation to new namespace object diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py --- a/mercurial/namespaces.py +++ b/mercurial/namespaces.py @@ -147,3 +147,8 @@ class namespace(object): 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))