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

Dan Villiom Podlaski Christiansen danchr at gmail.com
Fri Jan 6 08:16:08 CST 2012


# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
# Date 1325859352 -3600
# Node ID 04a823aa35bd4a8d37f7fc96901c1622b3181ee7
# Parent  31ace7a24b0384dc88a67763a73ccebe018f8077
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
@@ -1206,6 +1206,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 = list(ctx.removed())


More information about the Mercurial-devel mailing list