Mercurial > hg
comparison mercurial/namespaces.py @ 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 | 19d6271a70db |
children | 885c0290f7d5 |
comparison
equal
deleted
inserted
replaced
23773:c517b97c7609 | 23774:b9537ee87961 |
---|---|
138 | 138 |
139 def names(self, repo, node): | 139 def names(self, repo, node): |
140 """method that returns a (sorted) list of names in a namespace that | 140 """method that returns a (sorted) list of names in a namespace that |
141 match a given node""" | 141 match a given node""" |
142 return sorted(self.nodemap(repo, node)) | 142 return sorted(self.nodemap(repo, node)) |
143 | |
144 def nodes(self, repo, name): | |
145 """method that returns a list of nodes in a namespace that | |
146 match a given name. | |
147 | |
148 """ | |
149 return sorted(self.namemap(repo, name)) |