# HG changeset patch # User Durham Goode # Date 1430857921 25200 # Node ID 8fa74845eb1f2cdf50efdd28bf3d71e45c96f5c2 # Parent b5cd96395867ec43a57b06c7564cf02ee356697b inhibit: don't inhibit pinned commits during rebase During a rebase we pin certain commits to always be visible. This caused the inhibit extension to inhibit them when a transaction closed. Let's make inhibit aware of such pins and not obsolete them. diff -r b5cd96395867 -r 8fa74845eb1f hgext/inhibit.py --- a/hgext/inhibit.py Mon May 04 16:56:46 2015 -0700 +++ b/hgext/inhibit.py Tue May 05 13:32:01 2015 -0700 @@ -184,6 +184,8 @@ # At the end of the transaction we catch all the new visible and # obsolete commit to inhibit them visibleobsolete = repo.revs('(not hidden()) and obsolete()') + ignoreset = set(getattr(repo, '_rebaseset', [])) + 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) diff -r b5cd96395867 -r 8fa74845eb1f tests/test-inhibit.t --- a/tests/test-inhibit.t Mon May 04 16:56:46 2015 -0700 +++ b/tests/test-inhibit.t Tue May 05 13:32:01 2015 -0700 @@ -404,20 +404,16 @@ | o 12:fe1634cbe235 add cK | - | o 11:53a94305e133 add cL - | | - | o 10:ad78ff7d621f add cK + | @ 9:55c73a90e4b4 add cJ | | - | | @ 9:55c73a90e4b4 add cJ - | | | - | | | o 7:18214586bf78 add cJ - | | |/ - | | o 6:cf5c4f4554ce add cH - | | | - | | o 5:5419eb264a33 add cG - | | | - | | o 4:98065434e5c6 add cE + | | o 7:18214586bf78 add cJ | |/ + | o 6:cf5c4f4554ce add cH + | | + | o 5:5419eb264a33 add cG + | | + | o 4:98065434e5c6 add cE + | | o | 3:2db36d8066ff add cD | | o | 2:7df62a38b9bf add cC @@ -430,8 +426,6 @@ $ hg prune 1:: 5 changesets pruned - $ hg prune 10:: - 2 changesets pruned $ hg log -G @ 9:55c73a90e4b4 add cJ |