Mercurial > hg > evolve
changeset 1582:e8ebb2441e60 stable
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 10 Aug 2015 00:24:15 -0700 |
parents | 72eab894a89d |
children | ee5391999f2d |
files | hgext/inhibit.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/inhibit.py +++ b/hgext/inhibit.py @@ -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):