Mercurial > hg
diff mercurial/localrepo.py @ 37848:6e2259847f5f
bookmarks: extract function that looks up bookmark names by node
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 05 May 2018 11:34:03 +0900 |
parents | 856f381ad74b |
children | 1cba497491be |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat May 05 11:21:41 2018 +0900 +++ b/mercurial/localrepo.py Sat May 05 11:34:03 2018 +0900 @@ -1029,11 +1029,7 @@ def nodebookmarks(self, node): """return the list of bookmarks pointing to the specified node""" - marks = [] - for bookmark, n in self._bookmarks.iteritems(): - if n == node: - marks.append(bookmark) - return sorted(marks) + return self._bookmarks.names(node) def branchmap(self): '''returns a dictionary {branch: [branchheads]} with branchheads