sapling/tests/test-debuginhibit.t
Arun Kulshreshtha f46e6eb4da debuginhibit: print out inhibited nodes by default
Summary: If `hg debuginhibit` is run with no arguments, print out a list of inhibited nodes. This is similar to how `hg debugobsolete` works and will assist with debugging.

Test Plan: Run `hg debuginhibit` in a repo with inhibited nodes. (This can be tested by either stripping some test commits and then updating back to them, or by manually inhibiting the commits with `hg debuginhibit`.) A list of inhibited nodes should be printed. See test file for an example.

Reviewers: #mercurial, rmcelroy

Reviewed By: rmcelroy

Differential Revision: https://phabricator.intern.facebook.com/D4541514

Tasks: 16004717

Signature: t1:4541514:1486722366:10b4232830ed88931bd6ac610972114743797192

Revert Plan:
2017-02-10 11:28:33 -08:00

55 lines
1.4 KiB
Perl

Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit
$ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/debuginhibit.py $TESTTMP
$ cat >> $HGRCPATH << EOF
> [extensions]
> debuginhibit=$TESTTMP/debuginhibit.py
> directaccess=
> evolve=
> inhibit=
> [debuginhibit]
> printnodes = true
> printstack = true
> stackdepth = 1
> [experimental]
> evolution = createmarkers
> EOF
$ showgraph() {
> hg log --graph -T "{rev}:{node|short} {desc|firstline}"
> }
Test manually inhibiting and deinhibiting nodes.
$ hg init allowunstable && cd allowunstable
$ hg debugbuilddag "+3 *3"
$ showgraph
o 3:6100d3090acf r3
|
| o 2:01241442b3c2 r2
| |
| o 1:66f7d451a68b r1
|/
o 0:1ea73414a91b r0
$ hg debugobsolete 66f7d451a68b85ed82ff5fcc254daf50c74144bd 6100d3090acf50ed11ec23196cec20f5bd7323aa --config "debuginhibit.printstack=false"
Inhibiting: ['66f7d451a68b']
$ hg log -r 'unstable()'
$ hg debuginhibit
1:66f7d451a68b85ed82ff5fcc254daf50c74144bd r1
$ hg debuginhibit -d 1
Deinhibiting: ['66f7d451a68b']
Context:
[debuginhibit.py:*] debuginhibit() (glob)
$ hg log -r 'unstable()'
changeset: 2:01241442b3c2
user: debugbuilddag
date: Thu Jan 01 00:00:02 1970 +0000
trouble: unstable
summary: r2
$ hg debuginhibit
$ hg debuginhibit 1
Inhibiting: ['66f7d451a68b']
Context:
[debuginhibit.py:*] debuginhibit() (glob)