# HG changeset patch # User Pierre-Yves David # Date 1439191455 25200 # Node ID e8ebb2441e60621d7e610108794a379b856059c9 # Parent 72eab894a89d636429f7487a9a6853237cb11bbd inhibit: do not search for visible obsolete changeset during stripping Stripping use transaction in an unorthodox way. We should not run the inhibit postclose hooks as it can lead to crash. diff -r 72eab894a89d -r e8ebb2441e60 hgext/inhibit.py --- a/hgext/inhibit.py Fri Aug 07 11:39:51 2015 -0700 +++ b/hgext/inhibit.py Mon Aug 10 00:24:15 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):