hgext/inhibit.py
changeset 1488 3dec62fc266e
parent 1474 8e6de39b724d
parent 1486 e8ebb2441e60
child 1491 8f469f81129c
--- a/hgext/inhibit.py	Sat Aug 08 12:42:57 2015 -0700
+++ b/hgext/inhibit.py	Mon Aug 10 00:44:53 2015 -0700
@@ -166,7 +166,7 @@
     finally:
         lockmod.release(tr, lock)
 
-def transactioncallback(orig, repo, *args, **kwargs):
+def transactioncallback(orig, repo, desc, *args, **kwargs):
     """ Wrap localrepo.transaction to inhibit new obsolete changes """
     def inhibitposttransaction(transaction):
         # At the end of the transaction we catch all the new visible and
@@ -176,8 +176,9 @@
         visibleobsolete = list(r for r in visibleobsolete if r not in ignoreset)
         if visibleobsolete:
             _inhibitmarkers(repo, [repo[r].node() for r in visibleobsolete])
-    transaction = orig(repo, *args, **kwargs)
-    transaction.addpostclose('inhibitposttransaction', inhibitposttransaction)
+    transaction = orig(repo, desc, *args, **kwargs)
+    if desc != 'strip':
+        transaction.addpostclose('inhibitposttransaction', inhibitposttransaction)
     return transaction
 
 def extsetup(ui):