equal
deleted
inserted
replaced
1 from mercurial import util |
1 from mercurial import util |
|
2 import weakref |
2 |
3 |
3 def tolist(val): |
4 def tolist(val): |
4 """ |
5 """ |
5 a convenience method to return an empty list instead of None |
6 a convenience method to return an empty list instead of None |
6 """ |
7 """ |
28 'namemap': function that takes a name and returns a list of nodes |
29 'namemap': function that takes a name and returns a list of nodes |
29 """ |
30 """ |
30 |
31 |
31 _names_version = 0 |
32 _names_version = 0 |
32 |
33 |
33 def __init__(self): |
34 def __init__(self, repo): |
34 self._names = util.sortdict() |
35 self._names = util.sortdict() |
|
36 self._repo = weakref.ref(repo) |
35 |
37 |
36 def addnamespace(self, namespace, namemap, order=None): |
38 def addnamespace(self, namespace, namemap, order=None): |
37 """ |
39 """ |
38 register a namespace |
40 register a namespace |
39 |
41 |