Mercurial > hg-stable
changeset 23557:b04b27aa6da3
namespaces: add a convenience property for the weakref _repo
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 14 Dec 2014 16:22:24 -0800 |
parents | 7e1da5d004eb |
children | 3198aac7a95d |
files | mercurial/namespaces.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/namespaces.py Sun Dec 14 15:35:57 2014 -0800 +++ b/mercurial/namespaces.py Sun Dec 14 16:22:24 2014 -0800 @@ -35,6 +35,10 @@ self._names = util.sortdict() self._repo = weakref.ref(repo) + @property + def repo(self): + return self._repo() + def addnamespace(self, namespace, namemap, order=None): """ register a namespace