# HG changeset patch # User Durham Goode # Date 1428441963 25200 # Node ID d1c29db2e0555ae4f5a478de8ebbe25b1cdd4f94 # Parent dc5528e04c066a2012535a0b0a4ebf823a393ed8 prune: fix pruning w/ bookmarks and inhibit Previously prune would create the obsolesence markers, then try to fix up the bookmarks. With inhibit enabled, the act of closing a transaction for the bookmark step caused it to unhide commits that were trying to be pruned. The fix is to put the whole thing in a transaction. diff -r dc5528e04c06 -r d1c29db2e055 hgext/evolve.py --- a/hgext/evolve.py Tue Apr 07 14:08:18 2015 -0700 +++ b/hgext/evolve.py Tue Apr 07 14:26:03 2015 -0700 @@ -1801,6 +1801,7 @@ try: wlock = repo.wlock() lock = repo.lock() + tr = repo.transaction('prune') # defines pruned changesets precs = [] revs.sort() @@ -1891,7 +1892,11 @@ updatebookmarks = _bookmarksupdater(repo, ctx.node()) updatebookmarks(dest.node()) break + + tr.close() finally: + if tr: + tr.release() lockmod.release(lock, wlock) @command('amend|refresh', diff -r dc5528e04c06 -r d1c29db2e055 tests/test-inhibit.t --- a/tests/test-inhibit.t Tue Apr 07 14:08:18 2015 -0700 +++ b/tests/test-inhibit.t Tue Apr 07 14:26:03 2015 -0700 @@ -525,5 +525,18 @@ |/ o 14:d66ccb8c5871 add cL | - $ hg prune -r 104eed5354c7 - 1 changesets pruned + +Test prunestrip + + $ hg book foo -r 104eed5354c7 + $ hg strip -r 210589181b14 --config experimental.prunestrip=True --config extensions.strip= + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + working directory now at d66ccb8c5871 + 2 changesets pruned + $ hg log -r 14:: -G -T '{rev}:{node|short} {desc|firstline} {bookmarks}\n' + o 16:a438c045eb37 add cN + | + o 15:2d66e189f5b5 add cM + | + @ 14:d66ccb8c5871 add cL foo + |