hgext/inhibit.py
changeset 1366 9c3ba42c582a
parent 1362 73e5b5280c1c
child 1465 777e5c369d99
--- a/hgext/inhibit.py	Mon Jun 15 17:44:12 2015 -0700
+++ b/hgext/inhibit.py	Tue Jun 16 10:07:51 2015 -0700
@@ -48,9 +48,6 @@
             return newnode
 
     repo.__class__ = obsinhibitedrepo
-    # Wrapping this to inhibit obsolete revs resulting from a transaction
-    extensions.wrapfunction(localrepo.localrepository,
-                            'transaction', transactioncallback)
 
 def _update(orig, ui, repo, *args, **kwargs):
     """
@@ -199,6 +196,11 @@
     except KeyError:
         errormsg = _('Cannot use inhibit without the direct access extension')
         raise error.Abort(errormsg)
+
+    # Wrapping this to inhibit obsolete revs resulting from a transaction
+    extensions.wrapfunction(localrepo.localrepository,
+                            'transaction', transactioncallback)
+
     obsolete.cachefuncs['obsolete'] = _computeobsoleteset
     # wrap create marker to make it able to lift the inhibition
     extensions.wrapfunction(obsolete, 'createmarkers', _createmarkers)