Mercurial > public > mercurial-scm > hg-stable
diff mercurial/namespaces.py @ 23562:59e703aecaf6
namespaces: add tags
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Fri, 17 Oct 2014 15:27:33 -0700 |
parents | 3c2419e07df5 |
children | 114992041625 |
line wrap: on
line diff
--- a/mercurial/namespaces.py Sun Dec 14 19:11:44 2014 -0800 +++ b/mercurial/namespaces.py Fri Oct 17 15:27:33 2014 -0700 @@ -34,10 +34,15 @@ def __init__(self): self._names = util.sortdict() + addns = self.addnamespace + # we need current mercurial named objects (bookmarks, tags, and # branches) to be initialized somewhere, so that place is here - self.addnamespace("bookmarks", - lambda repo, name: tolist(repo._bookmarks.get(name))) + addns("bookmarks", + lambda repo, name: tolist(repo._bookmarks.get(name))) + + addns("tags", + lambda repo, name: tolist(repo._tagscache.tags.get(name))) def addnamespace(self, namespace, namemap, order=None): """