From patchwork Tue May 19 19:35:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [evolve-ext] inhibit: add test to ensure that --hidden is working with inhibit From: Laurent Charignon X-Patchwork-Id: 9187 Message-Id: To: Date: Tue, 19 May 2015 12:35:53 -0700 # HG changeset patch # User Laurent Charignon # Date 1431628324 25200 # Thu May 14 11:32:04 2015 -0700 # Node ID b45bfa3951d9287bf2741871cc6003f37739368b # Parent 10d2ef1f7ed48b8c20f3ef47f217bc105be38623 inhibit: add test to ensure that --hidden is working with inhibit There was a concern with the transaction hook in inhibit and its potentially devastating effect when used with --hidden. The transaction hook in inhibit hides all the visible & obsolete commits when the transaction ends using the visible() and the obsolete() revset. --hidden does not change the visible() revset so it is fine. If this changes in the future and --hidden actually ends up impacting the visible() revset, this test will catch it and prevent inhibit from putting inhibition markers on all of the obsolete changesets. diff --git a/tests/test-inhibit.t b/tests/test-inhibit.t --- a/tests/test-inhibit.t +++ b/tests/test-inhibit.t @@ -548,6 +548,89 @@ @ 14:d66ccb8c5871 add cL foo | +Check that --hidden used with inhibit does not hide every obsolete commit +We show the log before and after a log -G --hidden, they should be the same + $ hg log -G + o 16:a438c045eb37 add cN + | + o 15:2d66e189f5b5 add cM + | + @ 14:d66ccb8c5871 add cL + | + | o 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 0:54ccbc537fc2 add cA + + $ hg log -G --hidden + x 19:104eed5354c7 add cN + | + x 18:210589181b14 add cM + | + | x 17:b3c3274523f9 temporary amend commit for 2d66e189f5b5 + | | + | | o 16:a438c045eb37 add cN + | |/ + | o 15:2d66e189f5b5 add cM + |/ + @ 14:d66ccb8c5871 add cL + | + | x 13:2f7b7704d714 add cL + | | + | x 12:fe1634cbe235 add cK + | | + | | x 11:53a94305e133 add cL + | | | + | | x 10:ad78ff7d621f add cK + | | | + | | | o 9:55c73a90e4b4 add cJ + | | | | + +-------x 8:e84f73d9ad36 temporary amend commit for 18214586bf78 + | | | | + o-----+ 7:18214586bf78 add cJ + / / / + | | o 6:cf5c4f4554ce add cH + | | | + | | o 5:5419eb264a33 add cG + | | | + | | o 4:98065434e5c6 add cE + | |/ + x | 3:2db36d8066ff add cD + | | + x | 2:7df62a38b9bf add cC + | | + x | 1:02bcbc3f6e56 add cB + |/ + o 0:54ccbc537fc2 add cA + + + $ hg log -G + o 16:a438c045eb37 add cN + | + o 15:2d66e189f5b5 add cM + | + @ 14:d66ccb8c5871 add cL + | + | o 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 0:54ccbc537fc2 add cA + + Only allow direct access and check that evolve works like before $ cat >> $HGRCPATH < [inhibit]