namespaces: add a convenience property for the weakref _repo
authorSean Farley <sean.michael.farley@gmail.com>
Sun, 14 Dec 2014 16:22:24 -0800
changeset 23557 b04b27aa6da3
parent 23556 7e1da5d004eb
child 23558 3198aac7a95d
namespaces: add a convenience property for the weakref _repo
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