File: hg-bisect.1

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