[PATCH 2 of 5] bookmarks: wrap usercommitctx() instead of commitctx()

Dan Villiom Podlaski Christiansen danchr at gmail.com
Fri Jul 16 04:36:42 CDT 2010


# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
# Date 1279272489 -7200
# Node ID e5d29635c7d0c89505e7be1f7ceaea9a28311ee8
# Parent  fc7f31108e3cad9a770260e216ba69b278c79c66
bookmarks: wrap usercommitctx() instead of commitctx()

Prior to this change, bookmarks could, in theory, be updated as a
result of conversions.

diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py
--- a/hgext/bookmarks.py
+++ b/hgext/bookmarks.py
@@ -274,12 +274,12 @@ def reposetup(ui, repo):
             if update:
                 write(self)
 
-        def commitctx(self, ctx, error=False):
+        def usercommitctx(self, ctx, error=False):
             """Add a revision to the repository and
             move the bookmark"""
             wlock = self.wlock() # do both commit and bookmark with lock held
             try:
-                node  = super(bookmark_repo, self).commitctx(ctx, error)
+                node  = super(bookmark_repo, self).usercommitctx(ctx, error)
                 if node is None:
                     return None
                 parents = self.changelog.parents(node)


More information about the Mercurial-devel mailing list