Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo


Diff of /ForgeHg/forgehg/model/hg.py [9bfbf4] .. [dcb73d] Maximize Restore

  Switch to side-by-side view

--- a/ForgeHg/forgehg/model/hg.py
+++ b/ForgeHg/forgehg/model/hg.py
@@ -12,7 +12,7 @@
 from mercurial import ui, hg
 from ming.base import Object
-from ming.orm import MappedClass, session
+from ming.orm import Mapper, session
 from ming.utils import LazyProperty
 from allura import model as M
@@ -28,9 +28,9 @@
     class __mongometa__:
-    def __init__(self, **kw):
-        super(Repository, self).__init__(**kw)
-        self._impl = HgImplementation(self)
+    @LazyProperty
+    def _impl(self):
+        return HgImplementation(self)
     def merge_command(self, merge_request):
         '''Return the command to merge a given commit into a given target branch'''
@@ -232,4 +232,4 @@
         ctx = self._hg[commit.object_id]
         return [ctx.branch()], tags