| 1 |
.TH HG BISECT "" "" "" |
| 2 |
.SH NAME |
| 3 |
hg bisect \- subdivision search of changesets |
| 4 |
.\" Man page generated from reStructuredText. |
| 5 |
. |
| 6 |
.SH SYNOPSIS |
| 7 |
.sp |
| 8 |
.nf |
| 9 |
.ft C |
| 10 |
hg bisect [\-gbsr] [\-U] [\-c CMD] [REV] |
| 11 |
.ft P |
| 12 |
.fi |
| 13 |
.SH DESCRIPTION |
| 14 |
.sp |
| 15 |
This command helps to find changesets which introduce problems. To |
| 16 |
use, mark the earliest changeset you know exhibits the problem as |
| 17 |
bad, then mark the latest changeset which is free from the problem |
| 18 |
as good. Bisect will update your working directory to a revision |
| 19 |
for testing (unless the \-U/\-\-noupdate option is specified). Once |
| 20 |
you have performed tests, mark the working directory as good or |
| 21 |
bad, and bisect will either update to another candidate changeset |
| 22 |
or announce that it has found the bad revision. |
| 23 |
.sp |
| 24 |
As a shortcut, you can also use the revision argument to mark a |
| 25 |
revision as good or bad without checking it out first. |
| 26 |
.sp |
| 27 |
If you supply a command, it will be used for automatic bisection. |
| 28 |
The environment variable HG_NODE will contain the ID of the |
| 29 |
changeset being tested. The exit status of the command will be |
| 30 |
used to mark revisions as good or bad: status 0 means good, 125 |
| 31 |
means to skip the revision, 127 (command not found) will abort the |
| 32 |
bisection, and any other non\-zero exit status means the revision |
| 33 |
is bad. |
| 34 |
.sp |
| 35 |
Some examples: |
| 36 |
.INDENT 0.0 |
| 37 |
.IP \(bu 2 |
| 38 |
. |
| 39 |
start a bisection with known bad revision 34, and good revision 12: |
| 40 |
.sp |
| 41 |
.nf |
| 42 |
.ft C |
| 43 |
hg bisect \-\-bad 34 |
| 44 |
hg bisect \-\-good 12 |
| 45 |
.ft P |
| 46 |
.fi |
| 47 |
.IP \(bu 2 |
| 48 |
. |
| 49 |
advance the current bisection by marking current revision as good or |
| 50 |
bad: |
| 51 |
.sp |
| 52 |
.nf |
| 53 |
.ft C |
| 54 |
hg bisect \-\-good |
| 55 |
hg bisect \-\-bad |
| 56 |
.ft P |
| 57 |
.fi |
| 58 |
.IP \(bu 2 |
| 59 |
. |
| 60 |
mark the current revision, or a known revision, to be skipped (e.g. if |
| 61 |
that revision is not usable because of another issue): |
| 62 |
.sp |
| 63 |
.nf |
| 64 |
.ft C |
| 65 |
hg bisect \-\-skip |
| 66 |
hg bisect \-\-skip 23 |
| 67 |
.ft P |
| 68 |
.fi |
| 69 |
.IP \(bu 2 |
| 70 |
. |
| 71 |
skip all revisions that do not touch directories \fBfoo\fP or \fBbar\fP: |
| 72 |
.sp |
| 73 |
.nf |
| 74 |
.ft C |
| 75 |
hg bisect \-\-skip "!( file(\(aqpath:foo\(aq) & file(\(aqpath:bar\(aq) )" |
| 76 |
.ft P |
| 77 |
.fi |
| 78 |
.IP \(bu 2 |
| 79 |
. |
| 80 |
forget the current bisection: |
| 81 |
.sp |
| 82 |
.nf |
| 83 |
.ft C |
| 84 |
hg bisect \-\-reset |
| 85 |
.ft P |
| 86 |
.fi |
| 87 |
.IP \(bu 2 |
| 88 |
. |
| 89 |
use \(aqmake && make tests\(aq to automatically find the first broken |
| 90 |
revision: |
| 91 |
.sp |
| 92 |
.nf |
| 93 |
.ft C |
| 94 |
hg bisect \-\-reset |
| 95 |
hg bisect \-\-bad 34 |
| 96 |
hg bisect \-\-good 12 |
| 97 |
hg bisect \-\-command "make && make tests" |
| 98 |
.ft P |
| 99 |
.fi |
| 100 |
.IP \(bu 2 |
| 101 |
. |
| 102 |
see all changesets whose states are already known in the current |
| 103 |
bisection: |
| 104 |
.sp |
| 105 |
.nf |
| 106 |
.ft C |
| 107 |
hg log \-r "bisect(pruned)" |
| 108 |
.ft P |
| 109 |
.fi |
| 110 |
.IP \(bu 2 |
| 111 |
. |
| 112 |
see the changeset currently being bisected (especially useful |
| 113 |
if running with \-U/\-\-noupdate): |
| 114 |
.sp |
| 115 |
.nf |
| 116 |
.ft C |
| 117 |
hg log \-r "bisect(current)" |
| 118 |
.ft P |
| 119 |
.fi |
| 120 |
.IP \(bu 2 |
| 121 |
. |
| 122 |
see all changesets that took part in the current bisection: |
| 123 |
.sp |
| 124 |
.nf |
| 125 |
.ft C |
| 126 |
hg log \-r "bisect(range)" |
| 127 |
.ft P |
| 128 |
.fi |
| 129 |
.IP \(bu 2 |
| 130 |
. |
| 131 |
you can even get a nice graph: |
| 132 |
.sp |
| 133 |
.nf |
| 134 |
.ft C |
| 135 |
hg log \-\-graph \-r "bisect(range)" |
| 136 |
.ft P |
| 137 |
.fi |
| 138 |
.UNINDENT |
| 139 |
.sp |
| 140 |
See \%\fBhg help revisions.bisect\fP\: for more about the \fIbisect()\fP predicate. |
| 141 |
.sp |
| 142 |
Returns 0 on success. |
| 143 |
.SH OPTIONS |
| 144 |
.INDENT 0.0 |
| 145 |
.TP |
| 146 |
.B \-r, \-\-reset |
| 147 |
. |
| 148 |
reset bisect state |
| 149 |
.TP |
| 150 |
.B \-g, \-\-good |
| 151 |
. |
| 152 |
mark changeset good |
| 153 |
.TP |
| 154 |
.B \-b, \-\-bad |
| 155 |
. |
| 156 |
mark changeset bad |
| 157 |
.TP |
| 158 |
.B \-s, \-\-skip |
| 159 |
. |
| 160 |
skip testing changeset |
| 161 |
.TP |
| 162 |
.B \-e, \-\-extend |
| 163 |
. |
| 164 |
extend the bisect range |
| 165 |
.TP |
| 166 |
.BI \-c, \-\-command \ <CMD> |
| 167 |
. |
| 168 |
use command to check changeset state |
| 169 |
.TP |
| 170 |
.B \-U, \-\-noupdate |
| 171 |
. |
| 172 |
do not update to target |
| 173 |
.UNINDENT |
| 174 |
.\" Generated by docutils manpage writer. |
| 175 |
.\" |
| 176 |
. |