# HG changeset patch # User Sean Farley # Date 1418602944 28800 # Node ID b04b27aa6da3a659f3a2b310dacac04ddffdebe5 # Parent 7e1da5d004ebeaf7cce08883d3b6deaf10a0d725 namespaces: add a convenience property for the weakref _repo diff -r 7e1da5d004eb -r b04b27aa6da3 mercurial/namespaces.py --- 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