equal
deleted
inserted
replaced
32 _names_version = 0 |
32 _names_version = 0 |
33 |
33 |
34 def __init__(self): |
34 def __init__(self): |
35 self._names = util.sortdict() |
35 self._names = util.sortdict() |
36 |
36 |
|
37 addns = self.addnamespace |
|
38 |
37 # we need current mercurial named objects (bookmarks, tags, and |
39 # we need current mercurial named objects (bookmarks, tags, and |
38 # branches) to be initialized somewhere, so that place is here |
40 # branches) to be initialized somewhere, so that place is here |
39 self.addnamespace("bookmarks", |
41 addns("bookmarks", |
40 lambda repo, name: tolist(repo._bookmarks.get(name))) |
42 lambda repo, name: tolist(repo._bookmarks.get(name))) |
|
43 |
|
44 addns("tags", |
|
45 lambda repo, name: tolist(repo._tagscache.tags.get(name))) |
41 |
46 |
42 def addnamespace(self, namespace, namemap, order=None): |
47 def addnamespace(self, namespace, namemap, order=None): |
43 """ |
48 """ |
44 register a namespace |
49 register a namespace |
45 |
50 |