[PATCH 5 of 5] localrepo: assert that commitctx() hasn't been wrapped

Dan Villiom Podlaski Christiansen danchr at gmail.com
Tue Jul 13 07:16:23 CDT 2010


# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
# Date 1279022443 -7200
# Node ID 05ab1de9d91012921142413877309310a3833785
# Parent  18a7270e1597b70faef439bc8a48b0f6bf3ef3d5
localrepo: assert that commitctx() hasn't been wrapped.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -929,6 +929,10 @@ class localrepository(repo.repository):
         extensions. This method may be used part of a conversion where it's
         important that `ctx' is committed to the repository as-is.
         """
+        assert self.commitctx.__module__ == __name__, (
+            "commitctx should not be wrapped or specialized; please wrap "
+            "usercommitctx instead."
+        )
 
         tr = lock = None
         removed = ctx.removed()


More information about the Mercurial-devel mailing list