##// END OF EJS Templates
errors: raise StateError in `hg bisect`...
Martin von Zweigbergk -
r46487:e641bb2a default
parent child Browse files
Show More
@@ -1,329 +1,329 b''
1 # changelog bisection for mercurial
1 # changelog bisection for mercurial
2 #
2 #
3 # Copyright 2007 Matt Mackall
3 # Copyright 2007 Matt Mackall
4 # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org>
4 # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org>
5 #
5 #
6 # Inspired by git bisect, extension skeleton taken from mq.py.
6 # Inspired by git bisect, extension skeleton taken from mq.py.
7 #
7 #
8 # This software may be used and distributed according to the terms of the
8 # This software may be used and distributed according to the terms of the
9 # GNU General Public License version 2 or any later version.
9 # GNU General Public License version 2 or any later version.
10
10
11 from __future__ import absolute_import
11 from __future__ import absolute_import
12
12
13 import collections
13 import collections
14 import contextlib
14 import contextlib
15
15
16 from .i18n import _
16 from .i18n import _
17 from .node import (
17 from .node import (
18 hex,
18 hex,
19 short,
19 short,
20 )
20 )
21 from . import error
21 from . import error
22
22
23
23
24 def bisect(repo, state):
24 def bisect(repo, state):
25 """find the next node (if any) for testing during a bisect search.
25 """find the next node (if any) for testing during a bisect search.
26 returns a (nodes, number, good) tuple.
26 returns a (nodes, number, good) tuple.
27
27
28 'nodes' is the final result of the bisect if 'number' is 0.
28 'nodes' is the final result of the bisect if 'number' is 0.
29 Otherwise 'number' indicates the remaining possible candidates for
29 Otherwise 'number' indicates the remaining possible candidates for
30 the search and 'nodes' contains the next bisect target.
30 the search and 'nodes' contains the next bisect target.
31 'good' is True if bisect is searching for a first good changeset, False
31 'good' is True if bisect is searching for a first good changeset, False
32 if searching for a first bad one.
32 if searching for a first bad one.
33 """
33 """
34
34
35 repo = repo.unfiltered()
35 repo = repo.unfiltered()
36 changelog = repo.changelog
36 changelog = repo.changelog
37 clparents = changelog.parentrevs
37 clparents = changelog.parentrevs
38 skip = {changelog.rev(n) for n in state[b'skip']}
38 skip = {changelog.rev(n) for n in state[b'skip']}
39
39
40 def buildancestors(bad, good):
40 def buildancestors(bad, good):
41 badrev = min([changelog.rev(n) for n in bad])
41 badrev = min([changelog.rev(n) for n in bad])
42 ancestors = collections.defaultdict(lambda: None)
42 ancestors = collections.defaultdict(lambda: None)
43 for rev in repo.revs(b"descendants(%ln) - ancestors(%ln)", good, good):
43 for rev in repo.revs(b"descendants(%ln) - ancestors(%ln)", good, good):
44 ancestors[rev] = []
44 ancestors[rev] = []
45 if ancestors[badrev] is None:
45 if ancestors[badrev] is None:
46 return badrev, None
46 return badrev, None
47 return badrev, ancestors
47 return badrev, ancestors
48
48
49 good = False
49 good = False
50 badrev, ancestors = buildancestors(state[b'bad'], state[b'good'])
50 badrev, ancestors = buildancestors(state[b'bad'], state[b'good'])
51 if not ancestors: # looking for bad to good transition?
51 if not ancestors: # looking for bad to good transition?
52 good = True
52 good = True
53 badrev, ancestors = buildancestors(state[b'good'], state[b'bad'])
53 badrev, ancestors = buildancestors(state[b'good'], state[b'bad'])
54 bad = changelog.node(badrev)
54 bad = changelog.node(badrev)
55 if not ancestors: # now we're confused
55 if not ancestors: # now we're confused
56 if (
56 if (
57 len(state[b'bad']) == 1
57 len(state[b'bad']) == 1
58 and len(state[b'good']) == 1
58 and len(state[b'good']) == 1
59 and state[b'bad'] != state[b'good']
59 and state[b'bad'] != state[b'good']
60 ):
60 ):
61 raise error.Abort(_(b"starting revisions are not directly related"))
61 raise error.Abort(_(b"starting revisions are not directly related"))
62 raise error.Abort(
62 raise error.Abort(
63 _(b"inconsistent state, %d:%s is good and bad")
63 _(b"inconsistent state, %d:%s is good and bad")
64 % (badrev, short(bad))
64 % (badrev, short(bad))
65 )
65 )
66
66
67 # build children dict
67 # build children dict
68 children = {}
68 children = {}
69 visit = collections.deque([badrev])
69 visit = collections.deque([badrev])
70 candidates = []
70 candidates = []
71 while visit:
71 while visit:
72 rev = visit.popleft()
72 rev = visit.popleft()
73 if ancestors[rev] == []:
73 if ancestors[rev] == []:
74 candidates.append(rev)
74 candidates.append(rev)
75 for prev in clparents(rev):
75 for prev in clparents(rev):
76 if prev != -1:
76 if prev != -1:
77 if prev in children:
77 if prev in children:
78 children[prev].append(rev)
78 children[prev].append(rev)
79 else:
79 else:
80 children[prev] = [rev]
80 children[prev] = [rev]
81 visit.append(prev)
81 visit.append(prev)
82
82
83 candidates.sort()
83 candidates.sort()
84 # have we narrowed it down to one entry?
84 # have we narrowed it down to one entry?
85 # or have all other possible candidates besides 'bad' have been skipped?
85 # or have all other possible candidates besides 'bad' have been skipped?
86 tot = len(candidates)
86 tot = len(candidates)
87 unskipped = [c for c in candidates if (c not in skip) and (c != badrev)]
87 unskipped = [c for c in candidates if (c not in skip) and (c != badrev)]
88 if tot == 1 or not unskipped:
88 if tot == 1 or not unskipped:
89 return ([changelog.node(c) for c in candidates], 0, good)
89 return ([changelog.node(c) for c in candidates], 0, good)
90 perfect = tot // 2
90 perfect = tot // 2
91
91
92 # find the best node to test
92 # find the best node to test
93 best_rev = None
93 best_rev = None
94 best_len = -1
94 best_len = -1
95 poison = set()
95 poison = set()
96 for rev in candidates:
96 for rev in candidates:
97 if rev in poison:
97 if rev in poison:
98 # poison children
98 # poison children
99 poison.update(children.get(rev, []))
99 poison.update(children.get(rev, []))
100 continue
100 continue
101
101
102 a = ancestors[rev] or [rev]
102 a = ancestors[rev] or [rev]
103 ancestors[rev] = None
103 ancestors[rev] = None
104
104
105 x = len(a) # number of ancestors
105 x = len(a) # number of ancestors
106 y = tot - x # number of non-ancestors
106 y = tot - x # number of non-ancestors
107 value = min(x, y) # how good is this test?
107 value = min(x, y) # how good is this test?
108 if value > best_len and rev not in skip:
108 if value > best_len and rev not in skip:
109 best_len = value
109 best_len = value
110 best_rev = rev
110 best_rev = rev
111 if value == perfect: # found a perfect candidate? quit early
111 if value == perfect: # found a perfect candidate? quit early
112 break
112 break
113
113
114 if y < perfect and rev not in skip: # all downhill from here?
114 if y < perfect and rev not in skip: # all downhill from here?
115 # poison children
115 # poison children
116 poison.update(children.get(rev, []))
116 poison.update(children.get(rev, []))
117 continue
117 continue
118
118
119 for c in children.get(rev, []):
119 for c in children.get(rev, []):
120 if ancestors[c]:
120 if ancestors[c]:
121 ancestors[c] = list(set(ancestors[c] + a))
121 ancestors[c] = list(set(ancestors[c] + a))
122 else:
122 else:
123 ancestors[c] = a + [c]
123 ancestors[c] = a + [c]
124
124
125 assert best_rev is not None
125 assert best_rev is not None
126 best_node = changelog.node(best_rev)
126 best_node = changelog.node(best_rev)
127
127
128 return ([best_node], tot, good)
128 return ([best_node], tot, good)
129
129
130
130
131 def extendrange(repo, state, nodes, good):
131 def extendrange(repo, state, nodes, good):
132 # bisect is incomplete when it ends on a merge node and
132 # bisect is incomplete when it ends on a merge node and
133 # one of the parent was not checked.
133 # one of the parent was not checked.
134 parents = repo[nodes[0]].parents()
134 parents = repo[nodes[0]].parents()
135 if len(parents) > 1:
135 if len(parents) > 1:
136 if good:
136 if good:
137 side = state[b'bad']
137 side = state[b'bad']
138 else:
138 else:
139 side = state[b'good']
139 side = state[b'good']
140 num = len({i.node() for i in parents} & set(side))
140 num = len({i.node() for i in parents} & set(side))
141 if num == 1:
141 if num == 1:
142 return parents[0].ancestor(parents[1])
142 return parents[0].ancestor(parents[1])
143 return None
143 return None
144
144
145
145
146 def load_state(repo):
146 def load_state(repo):
147 state = {b'current': [], b'good': [], b'bad': [], b'skip': []}
147 state = {b'current': [], b'good': [], b'bad': [], b'skip': []}
148 for l in repo.vfs.tryreadlines(b"bisect.state"):
148 for l in repo.vfs.tryreadlines(b"bisect.state"):
149 kind, node = l[:-1].split()
149 kind, node = l[:-1].split()
150 node = repo.unfiltered().lookup(node)
150 node = repo.unfiltered().lookup(node)
151 if kind not in state:
151 if kind not in state:
152 raise error.Abort(_(b"unknown bisect kind %s") % kind)
152 raise error.Abort(_(b"unknown bisect kind %s") % kind)
153 state[kind].append(node)
153 state[kind].append(node)
154 return state
154 return state
155
155
156
156
157 def save_state(repo, state):
157 def save_state(repo, state):
158 f = repo.vfs(b"bisect.state", b"w", atomictemp=True)
158 f = repo.vfs(b"bisect.state", b"w", atomictemp=True)
159 with repo.wlock():
159 with repo.wlock():
160 for kind in sorted(state):
160 for kind in sorted(state):
161 for node in state[kind]:
161 for node in state[kind]:
162 f.write(b"%s %s\n" % (kind, hex(node)))
162 f.write(b"%s %s\n" % (kind, hex(node)))
163 f.close()
163 f.close()
164
164
165
165
166 def resetstate(repo):
166 def resetstate(repo):
167 """remove any bisect state from the repository"""
167 """remove any bisect state from the repository"""
168 if repo.vfs.exists(b"bisect.state"):
168 if repo.vfs.exists(b"bisect.state"):
169 repo.vfs.unlink(b"bisect.state")
169 repo.vfs.unlink(b"bisect.state")
170
170
171
171
172 def checkstate(state):
172 def checkstate(state):
173 """check we have both 'good' and 'bad' to define a range
173 """check we have both 'good' and 'bad' to define a range
174
174
175 Raise Abort exception otherwise."""
175 Raise StateError exception otherwise."""
176 if state[b'good'] and state[b'bad']:
176 if state[b'good'] and state[b'bad']:
177 return True
177 return True
178 if not state[b'good']:
178 if not state[b'good']:
179 raise error.Abort(_(b'cannot bisect (no known good revisions)'))
179 raise error.StateError(_(b'cannot bisect (no known good revisions)'))
180 else:
180 else:
181 raise error.Abort(_(b'cannot bisect (no known bad revisions)'))
181 raise error.StateError(_(b'cannot bisect (no known bad revisions)'))
182
182
183
183
184 @contextlib.contextmanager
184 @contextlib.contextmanager
185 def restore_state(repo, state, node):
185 def restore_state(repo, state, node):
186 try:
186 try:
187 yield
187 yield
188 finally:
188 finally:
189 state[b'current'] = [node]
189 state[b'current'] = [node]
190 save_state(repo, state)
190 save_state(repo, state)
191
191
192
192
193 def get(repo, status):
193 def get(repo, status):
194 """
194 """
195 Return a list of revision(s) that match the given status:
195 Return a list of revision(s) that match the given status:
196
196
197 - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip
197 - ``good``, ``bad``, ``skip``: csets explicitly marked as good/bad/skip
198 - ``goods``, ``bads`` : csets topologically good/bad
198 - ``goods``, ``bads`` : csets topologically good/bad
199 - ``range`` : csets taking part in the bisection
199 - ``range`` : csets taking part in the bisection
200 - ``pruned`` : csets that are goods, bads or skipped
200 - ``pruned`` : csets that are goods, bads or skipped
201 - ``untested`` : csets whose fate is yet unknown
201 - ``untested`` : csets whose fate is yet unknown
202 - ``ignored`` : csets ignored due to DAG topology
202 - ``ignored`` : csets ignored due to DAG topology
203 - ``current`` : the cset currently being bisected
203 - ``current`` : the cset currently being bisected
204 """
204 """
205 state = load_state(repo)
205 state = load_state(repo)
206 if status in (b'good', b'bad', b'skip', b'current'):
206 if status in (b'good', b'bad', b'skip', b'current'):
207 return map(repo.unfiltered().changelog.rev, state[status])
207 return map(repo.unfiltered().changelog.rev, state[status])
208 else:
208 else:
209 # In the following sets, we do *not* call 'bisect()' with more
209 # In the following sets, we do *not* call 'bisect()' with more
210 # than one level of recursion, because that can be very, very
210 # than one level of recursion, because that can be very, very
211 # time consuming. Instead, we always develop the expression as
211 # time consuming. Instead, we always develop the expression as
212 # much as possible.
212 # much as possible.
213
213
214 # 'range' is all csets that make the bisection:
214 # 'range' is all csets that make the bisection:
215 # - have a good ancestor and a bad descendant, or conversely
215 # - have a good ancestor and a bad descendant, or conversely
216 # that's because the bisection can go either way
216 # that's because the bisection can go either way
217 range = b'( bisect(bad)::bisect(good) | bisect(good)::bisect(bad) )'
217 range = b'( bisect(bad)::bisect(good) | bisect(good)::bisect(bad) )'
218
218
219 _t = repo.revs(b'bisect(good)::bisect(bad)')
219 _t = repo.revs(b'bisect(good)::bisect(bad)')
220 # The sets of topologically good or bad csets
220 # The sets of topologically good or bad csets
221 if len(_t) == 0:
221 if len(_t) == 0:
222 # Goods are topologically after bads
222 # Goods are topologically after bads
223 goods = b'bisect(good)::' # Pruned good csets
223 goods = b'bisect(good)::' # Pruned good csets
224 bads = b'::bisect(bad)' # Pruned bad csets
224 bads = b'::bisect(bad)' # Pruned bad csets
225 else:
225 else:
226 # Goods are topologically before bads
226 # Goods are topologically before bads
227 goods = b'::bisect(good)' # Pruned good csets
227 goods = b'::bisect(good)' # Pruned good csets
228 bads = b'bisect(bad)::' # Pruned bad csets
228 bads = b'bisect(bad)::' # Pruned bad csets
229
229
230 # 'pruned' is all csets whose fate is already known: good, bad, skip
230 # 'pruned' is all csets whose fate is already known: good, bad, skip
231 skips = b'bisect(skip)' # Pruned skipped csets
231 skips = b'bisect(skip)' # Pruned skipped csets
232 pruned = b'( (%s) | (%s) | (%s) )' % (goods, bads, skips)
232 pruned = b'( (%s) | (%s) | (%s) )' % (goods, bads, skips)
233
233
234 # 'untested' is all cset that are- in 'range', but not in 'pruned'
234 # 'untested' is all cset that are- in 'range', but not in 'pruned'
235 untested = b'( (%s) - (%s) )' % (range, pruned)
235 untested = b'( (%s) - (%s) )' % (range, pruned)
236
236
237 # 'ignored' is all csets that were not used during the bisection
237 # 'ignored' is all csets that were not used during the bisection
238 # due to DAG topology, but may however have had an impact.
238 # due to DAG topology, but may however have had an impact.
239 # E.g., a branch merged between bads and goods, but whose branch-
239 # E.g., a branch merged between bads and goods, but whose branch-
240 # point is out-side of the range.
240 # point is out-side of the range.
241 iba = b'::bisect(bad) - ::bisect(good)' # Ignored bads' ancestors
241 iba = b'::bisect(bad) - ::bisect(good)' # Ignored bads' ancestors
242 iga = b'::bisect(good) - ::bisect(bad)' # Ignored goods' ancestors
242 iga = b'::bisect(good) - ::bisect(bad)' # Ignored goods' ancestors
243 ignored = b'( ( (%s) | (%s) ) - (%s) )' % (iba, iga, range)
243 ignored = b'( ( (%s) | (%s) ) - (%s) )' % (iba, iga, range)
244
244
245 if status == b'range':
245 if status == b'range':
246 return repo.revs(range)
246 return repo.revs(range)
247 elif status == b'pruned':
247 elif status == b'pruned':
248 return repo.revs(pruned)
248 return repo.revs(pruned)
249 elif status == b'untested':
249 elif status == b'untested':
250 return repo.revs(untested)
250 return repo.revs(untested)
251 elif status == b'ignored':
251 elif status == b'ignored':
252 return repo.revs(ignored)
252 return repo.revs(ignored)
253 elif status == b"goods":
253 elif status == b"goods":
254 return repo.revs(goods)
254 return repo.revs(goods)
255 elif status == b"bads":
255 elif status == b"bads":
256 return repo.revs(bads)
256 return repo.revs(bads)
257 else:
257 else:
258 raise error.ParseError(_(b'invalid bisect state'))
258 raise error.ParseError(_(b'invalid bisect state'))
259
259
260
260
261 def label(repo, node):
261 def label(repo, node):
262 rev = repo.changelog.rev(node)
262 rev = repo.changelog.rev(node)
263
263
264 # Try explicit sets
264 # Try explicit sets
265 if rev in get(repo, b'good'):
265 if rev in get(repo, b'good'):
266 # i18n: bisect changeset status
266 # i18n: bisect changeset status
267 return _(b'good')
267 return _(b'good')
268 if rev in get(repo, b'bad'):
268 if rev in get(repo, b'bad'):
269 # i18n: bisect changeset status
269 # i18n: bisect changeset status
270 return _(b'bad')
270 return _(b'bad')
271 if rev in get(repo, b'skip'):
271 if rev in get(repo, b'skip'):
272 # i18n: bisect changeset status
272 # i18n: bisect changeset status
273 return _(b'skipped')
273 return _(b'skipped')
274 if rev in get(repo, b'untested') or rev in get(repo, b'current'):
274 if rev in get(repo, b'untested') or rev in get(repo, b'current'):
275 # i18n: bisect changeset status
275 # i18n: bisect changeset status
276 return _(b'untested')
276 return _(b'untested')
277 if rev in get(repo, b'ignored'):
277 if rev in get(repo, b'ignored'):
278 # i18n: bisect changeset status
278 # i18n: bisect changeset status
279 return _(b'ignored')
279 return _(b'ignored')
280
280
281 # Try implicit sets
281 # Try implicit sets
282 if rev in get(repo, b'goods'):
282 if rev in get(repo, b'goods'):
283 # i18n: bisect changeset status
283 # i18n: bisect changeset status
284 return _(b'good (implicit)')
284 return _(b'good (implicit)')
285 if rev in get(repo, b'bads'):
285 if rev in get(repo, b'bads'):
286 # i18n: bisect changeset status
286 # i18n: bisect changeset status
287 return _(b'bad (implicit)')
287 return _(b'bad (implicit)')
288
288
289 return None
289 return None
290
290
291
291
292 def printresult(ui, repo, state, displayer, nodes, good):
292 def printresult(ui, repo, state, displayer, nodes, good):
293 repo = repo.unfiltered()
293 repo = repo.unfiltered()
294 if len(nodes) == 1:
294 if len(nodes) == 1:
295 # narrowed it down to a single revision
295 # narrowed it down to a single revision
296 if good:
296 if good:
297 ui.write(_(b"The first good revision is:\n"))
297 ui.write(_(b"The first good revision is:\n"))
298 else:
298 else:
299 ui.write(_(b"The first bad revision is:\n"))
299 ui.write(_(b"The first bad revision is:\n"))
300 displayer.show(repo[nodes[0]])
300 displayer.show(repo[nodes[0]])
301 extendnode = extendrange(repo, state, nodes, good)
301 extendnode = extendrange(repo, state, nodes, good)
302 if extendnode is not None:
302 if extendnode is not None:
303 ui.write(
303 ui.write(
304 _(
304 _(
305 b'Not all ancestors of this changeset have been'
305 b'Not all ancestors of this changeset have been'
306 b' checked.\nUse bisect --extend to continue the '
306 b' checked.\nUse bisect --extend to continue the '
307 b'bisection from\nthe common ancestor, %s.\n'
307 b'bisection from\nthe common ancestor, %s.\n'
308 )
308 )
309 % extendnode
309 % extendnode
310 )
310 )
311 else:
311 else:
312 # multiple possible revisions
312 # multiple possible revisions
313 if good:
313 if good:
314 ui.write(
314 ui.write(
315 _(
315 _(
316 b"Due to skipped revisions, the first "
316 b"Due to skipped revisions, the first "
317 b"good revision could be any of:\n"
317 b"good revision could be any of:\n"
318 )
318 )
319 )
319 )
320 else:
320 else:
321 ui.write(
321 ui.write(
322 _(
322 _(
323 b"Due to skipped revisions, the first "
323 b"Due to skipped revisions, the first "
324 b"bad revision could be any of:\n"
324 b"bad revision could be any of:\n"
325 )
325 )
326 )
326 )
327 for n in nodes:
327 for n in nodes:
328 displayer.show(repo[n])
328 displayer.show(repo[n])
329 displayer.close()
329 displayer.close()
@@ -1,796 +1,796 b''
1 $ hg init
1 $ hg init
2
2
3
3
4 committing changes
4 committing changes
5
5
6 $ count=0
6 $ count=0
7 $ echo > a
7 $ echo > a
8 $ while test $count -lt 32 ; do
8 $ while test $count -lt 32 ; do
9 > echo 'a' >> a
9 > echo 'a' >> a
10 > test $count -eq 0 && hg add
10 > test $count -eq 0 && hg add
11 > hg ci -m "msg $count" -d "$count 0"
11 > hg ci -m "msg $count" -d "$count 0"
12 > count=`expr $count + 1`
12 > count=`expr $count + 1`
13 > done
13 > done
14 adding a
14 adding a
15
15
16
16
17 $ hg log
17 $ hg log
18 changeset: 31:58c80a7c8a40
18 changeset: 31:58c80a7c8a40
19 tag: tip
19 tag: tip
20 user: test
20 user: test
21 date: Thu Jan 01 00:00:31 1970 +0000
21 date: Thu Jan 01 00:00:31 1970 +0000
22 summary: msg 31
22 summary: msg 31
23
23
24 changeset: 30:ed2d2f24b11c
24 changeset: 30:ed2d2f24b11c
25 user: test
25 user: test
26 date: Thu Jan 01 00:00:30 1970 +0000
26 date: Thu Jan 01 00:00:30 1970 +0000
27 summary: msg 30
27 summary: msg 30
28
28
29 changeset: 29:b5bd63375ab9
29 changeset: 29:b5bd63375ab9
30 user: test
30 user: test
31 date: Thu Jan 01 00:00:29 1970 +0000
31 date: Thu Jan 01 00:00:29 1970 +0000
32 summary: msg 29
32 summary: msg 29
33
33
34 changeset: 28:8e0c2264c8af
34 changeset: 28:8e0c2264c8af
35 user: test
35 user: test
36 date: Thu Jan 01 00:00:28 1970 +0000
36 date: Thu Jan 01 00:00:28 1970 +0000
37 summary: msg 28
37 summary: msg 28
38
38
39 changeset: 27:288867a866e9
39 changeset: 27:288867a866e9
40 user: test
40 user: test
41 date: Thu Jan 01 00:00:27 1970 +0000
41 date: Thu Jan 01 00:00:27 1970 +0000
42 summary: msg 27
42 summary: msg 27
43
43
44 changeset: 26:3efc6fd51aeb
44 changeset: 26:3efc6fd51aeb
45 user: test
45 user: test
46 date: Thu Jan 01 00:00:26 1970 +0000
46 date: Thu Jan 01 00:00:26 1970 +0000
47 summary: msg 26
47 summary: msg 26
48
48
49 changeset: 25:02a84173a97a
49 changeset: 25:02a84173a97a
50 user: test
50 user: test
51 date: Thu Jan 01 00:00:25 1970 +0000
51 date: Thu Jan 01 00:00:25 1970 +0000
52 summary: msg 25
52 summary: msg 25
53
53
54 changeset: 24:10e0acd3809e
54 changeset: 24:10e0acd3809e
55 user: test
55 user: test
56 date: Thu Jan 01 00:00:24 1970 +0000
56 date: Thu Jan 01 00:00:24 1970 +0000
57 summary: msg 24
57 summary: msg 24
58
58
59 changeset: 23:5ec79163bff4
59 changeset: 23:5ec79163bff4
60 user: test
60 user: test
61 date: Thu Jan 01 00:00:23 1970 +0000
61 date: Thu Jan 01 00:00:23 1970 +0000
62 summary: msg 23
62 summary: msg 23
63
63
64 changeset: 22:06c7993750ce
64 changeset: 22:06c7993750ce
65 user: test
65 user: test
66 date: Thu Jan 01 00:00:22 1970 +0000
66 date: Thu Jan 01 00:00:22 1970 +0000
67 summary: msg 22
67 summary: msg 22
68
68
69 changeset: 21:e5db6aa3fe2a
69 changeset: 21:e5db6aa3fe2a
70 user: test
70 user: test
71 date: Thu Jan 01 00:00:21 1970 +0000
71 date: Thu Jan 01 00:00:21 1970 +0000
72 summary: msg 21
72 summary: msg 21
73
73
74 changeset: 20:7128fb4fdbc9
74 changeset: 20:7128fb4fdbc9
75 user: test
75 user: test
76 date: Thu Jan 01 00:00:20 1970 +0000
76 date: Thu Jan 01 00:00:20 1970 +0000
77 summary: msg 20
77 summary: msg 20
78
78
79 changeset: 19:52798545b482
79 changeset: 19:52798545b482
80 user: test
80 user: test
81 date: Thu Jan 01 00:00:19 1970 +0000
81 date: Thu Jan 01 00:00:19 1970 +0000
82 summary: msg 19
82 summary: msg 19
83
83
84 changeset: 18:86977a90077e
84 changeset: 18:86977a90077e
85 user: test
85 user: test
86 date: Thu Jan 01 00:00:18 1970 +0000
86 date: Thu Jan 01 00:00:18 1970 +0000
87 summary: msg 18
87 summary: msg 18
88
88
89 changeset: 17:03515f4a9080
89 changeset: 17:03515f4a9080
90 user: test
90 user: test
91 date: Thu Jan 01 00:00:17 1970 +0000
91 date: Thu Jan 01 00:00:17 1970 +0000
92 summary: msg 17
92 summary: msg 17
93
93
94 changeset: 16:a2e6ea4973e9
94 changeset: 16:a2e6ea4973e9
95 user: test
95 user: test
96 date: Thu Jan 01 00:00:16 1970 +0000
96 date: Thu Jan 01 00:00:16 1970 +0000
97 summary: msg 16
97 summary: msg 16
98
98
99 changeset: 15:e7fa0811edb0
99 changeset: 15:e7fa0811edb0
100 user: test
100 user: test
101 date: Thu Jan 01 00:00:15 1970 +0000
101 date: Thu Jan 01 00:00:15 1970 +0000
102 summary: msg 15
102 summary: msg 15
103
103
104 changeset: 14:ce8f0998e922
104 changeset: 14:ce8f0998e922
105 user: test
105 user: test
106 date: Thu Jan 01 00:00:14 1970 +0000
106 date: Thu Jan 01 00:00:14 1970 +0000
107 summary: msg 14
107 summary: msg 14
108
108
109 changeset: 13:9d7d07bc967c
109 changeset: 13:9d7d07bc967c
110 user: test
110 user: test
111 date: Thu Jan 01 00:00:13 1970 +0000
111 date: Thu Jan 01 00:00:13 1970 +0000
112 summary: msg 13
112 summary: msg 13
113
113
114 changeset: 12:1941b52820a5
114 changeset: 12:1941b52820a5
115 user: test
115 user: test
116 date: Thu Jan 01 00:00:12 1970 +0000
116 date: Thu Jan 01 00:00:12 1970 +0000
117 summary: msg 12
117 summary: msg 12
118
118
119 changeset: 11:7b4cd9578619
119 changeset: 11:7b4cd9578619
120 user: test
120 user: test
121 date: Thu Jan 01 00:00:11 1970 +0000
121 date: Thu Jan 01 00:00:11 1970 +0000
122 summary: msg 11
122 summary: msg 11
123
123
124 changeset: 10:7c5eff49a6b6
124 changeset: 10:7c5eff49a6b6
125 user: test
125 user: test
126 date: Thu Jan 01 00:00:10 1970 +0000
126 date: Thu Jan 01 00:00:10 1970 +0000
127 summary: msg 10
127 summary: msg 10
128
128
129 changeset: 9:eb44510ef29a
129 changeset: 9:eb44510ef29a
130 user: test
130 user: test
131 date: Thu Jan 01 00:00:09 1970 +0000
131 date: Thu Jan 01 00:00:09 1970 +0000
132 summary: msg 9
132 summary: msg 9
133
133
134 changeset: 8:453eb4dba229
134 changeset: 8:453eb4dba229
135 user: test
135 user: test
136 date: Thu Jan 01 00:00:08 1970 +0000
136 date: Thu Jan 01 00:00:08 1970 +0000
137 summary: msg 8
137 summary: msg 8
138
138
139 changeset: 7:03750880c6b5
139 changeset: 7:03750880c6b5
140 user: test
140 user: test
141 date: Thu Jan 01 00:00:07 1970 +0000
141 date: Thu Jan 01 00:00:07 1970 +0000
142 summary: msg 7
142 summary: msg 7
143
143
144 changeset: 6:a3d5c6fdf0d3
144 changeset: 6:a3d5c6fdf0d3
145 user: test
145 user: test
146 date: Thu Jan 01 00:00:06 1970 +0000
146 date: Thu Jan 01 00:00:06 1970 +0000
147 summary: msg 6
147 summary: msg 6
148
148
149 changeset: 5:7874a09ea728
149 changeset: 5:7874a09ea728
150 user: test
150 user: test
151 date: Thu Jan 01 00:00:05 1970 +0000
151 date: Thu Jan 01 00:00:05 1970 +0000
152 summary: msg 5
152 summary: msg 5
153
153
154 changeset: 4:9b2ba8336a65
154 changeset: 4:9b2ba8336a65
155 user: test
155 user: test
156 date: Thu Jan 01 00:00:04 1970 +0000
156 date: Thu Jan 01 00:00:04 1970 +0000
157 summary: msg 4
157 summary: msg 4
158
158
159 changeset: 3:b53bea5e2fcb
159 changeset: 3:b53bea5e2fcb
160 user: test
160 user: test
161 date: Thu Jan 01 00:00:03 1970 +0000
161 date: Thu Jan 01 00:00:03 1970 +0000
162 summary: msg 3
162 summary: msg 3
163
163
164 changeset: 2:db07c04beaca
164 changeset: 2:db07c04beaca
165 user: test
165 user: test
166 date: Thu Jan 01 00:00:02 1970 +0000
166 date: Thu Jan 01 00:00:02 1970 +0000
167 summary: msg 2
167 summary: msg 2
168
168
169 changeset: 1:5cd978ea5149
169 changeset: 1:5cd978ea5149
170 user: test
170 user: test
171 date: Thu Jan 01 00:00:01 1970 +0000
171 date: Thu Jan 01 00:00:01 1970 +0000
172 summary: msg 1
172 summary: msg 1
173
173
174 changeset: 0:b99c7b9c8e11
174 changeset: 0:b99c7b9c8e11
175 user: test
175 user: test
176 date: Thu Jan 01 00:00:00 1970 +0000
176 date: Thu Jan 01 00:00:00 1970 +0000
177 summary: msg 0
177 summary: msg 0
178
178
179
179
180 $ hg up -C
180 $ hg up -C
181 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
182
182
183 bisect test
183 bisect test
184
184
185 $ hg bisect -r
185 $ hg bisect -r
186 $ hg bisect -b
186 $ hg bisect -b
187 $ hg status -v
187 $ hg status -v
188 # The repository is in an unfinished *bisect* state.
188 # The repository is in an unfinished *bisect* state.
189
189
190 # To mark the changeset good: hg bisect --good
190 # To mark the changeset good: hg bisect --good
191 # To mark the changeset bad: hg bisect --bad
191 # To mark the changeset bad: hg bisect --bad
192 # To abort: hg bisect --reset
192 # To abort: hg bisect --reset
193
193
194 $ hg status -v --config commands.status.skipstates=bisect
194 $ hg status -v --config commands.status.skipstates=bisect
195 $ hg summary
195 $ hg summary
196 parent: 31:58c80a7c8a40 tip
196 parent: 31:58c80a7c8a40 tip
197 msg 31
197 msg 31
198 branch: default
198 branch: default
199 commit: (clean)
199 commit: (clean)
200 update: (current)
200 update: (current)
201 phases: 32 draft
201 phases: 32 draft
202 $ hg bisect -g 1
202 $ hg bisect -g 1
203 Testing changeset 16:a2e6ea4973e9 (30 changesets remaining, ~4 tests)
203 Testing changeset 16:a2e6ea4973e9 (30 changesets remaining, ~4 tests)
204 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
204 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
205 $ hg bisect -g
205 $ hg bisect -g
206 Testing changeset 23:5ec79163bff4 (15 changesets remaining, ~3 tests)
206 Testing changeset 23:5ec79163bff4 (15 changesets remaining, ~3 tests)
207 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
207 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
208
208
209 skip
209 skip
210
210
211 $ hg bisect -s
211 $ hg bisect -s
212 Testing changeset 24:10e0acd3809e (15 changesets remaining, ~3 tests)
212 Testing changeset 24:10e0acd3809e (15 changesets remaining, ~3 tests)
213 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
213 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
214 $ hg bisect -g
214 $ hg bisect -g
215 Testing changeset 27:288867a866e9 (7 changesets remaining, ~2 tests)
215 Testing changeset 27:288867a866e9 (7 changesets remaining, ~2 tests)
216 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
216 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
217 $ hg bisect -g
217 $ hg bisect -g
218 Testing changeset 29:b5bd63375ab9 (4 changesets remaining, ~2 tests)
218 Testing changeset 29:b5bd63375ab9 (4 changesets remaining, ~2 tests)
219 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
219 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
220 $ hg bisect -b
220 $ hg bisect -b
221 Testing changeset 28:8e0c2264c8af (2 changesets remaining, ~1 tests)
221 Testing changeset 28:8e0c2264c8af (2 changesets remaining, ~1 tests)
222 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
222 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
223 $ hg bisect -g
223 $ hg bisect -g
224 The first bad revision is:
224 The first bad revision is:
225 changeset: 29:b5bd63375ab9
225 changeset: 29:b5bd63375ab9
226 user: test
226 user: test
227 date: Thu Jan 01 00:00:29 1970 +0000
227 date: Thu Jan 01 00:00:29 1970 +0000
228 summary: msg 29
228 summary: msg 29
229
229
230
230
231 mark revsets instead of single revs
231 mark revsets instead of single revs
232
232
233 $ hg bisect -r
233 $ hg bisect -r
234 $ hg bisect -b "0::3"
234 $ hg bisect -b "0::3"
235 $ hg bisect -s "13::16"
235 $ hg bisect -s "13::16"
236 $ hg bisect -g "26::tip"
236 $ hg bisect -g "26::tip"
237 Testing changeset 12:1941b52820a5 (23 changesets remaining, ~4 tests)
237 Testing changeset 12:1941b52820a5 (23 changesets remaining, ~4 tests)
238 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
238 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
239 $ cat .hg/bisect.state
239 $ cat .hg/bisect.state
240 bad b99c7b9c8e11558adef3fad9af211c58d46f325b
240 bad b99c7b9c8e11558adef3fad9af211c58d46f325b
241 bad 5cd978ea51499179507ee7b6f340d2dbaa401185
241 bad 5cd978ea51499179507ee7b6f340d2dbaa401185
242 bad db07c04beaca44cf24832541e7f4a2346a95275b
242 bad db07c04beaca44cf24832541e7f4a2346a95275b
243 bad b53bea5e2fcb30d3e00bd3409507a5659ce0fd8b
243 bad b53bea5e2fcb30d3e00bd3409507a5659ce0fd8b
244 current 1941b52820a544549596820a8ae006842b0e2c64
244 current 1941b52820a544549596820a8ae006842b0e2c64
245 good 3efc6fd51aeb8594398044c6c846ca59ae021203
245 good 3efc6fd51aeb8594398044c6c846ca59ae021203
246 good 288867a866e9adb7a29880b66936c874b80f4651
246 good 288867a866e9adb7a29880b66936c874b80f4651
247 good 8e0c2264c8af790daf3585ada0669d93dee09c83
247 good 8e0c2264c8af790daf3585ada0669d93dee09c83
248 good b5bd63375ab9a290419f2024b7f4ee9ea7ce90a8
248 good b5bd63375ab9a290419f2024b7f4ee9ea7ce90a8
249 good ed2d2f24b11c368fa8aa0da9f4e1db580abade59
249 good ed2d2f24b11c368fa8aa0da9f4e1db580abade59
250 good 58c80a7c8a4025a94cedaf7b4a4e3124e8909a96
250 good 58c80a7c8a4025a94cedaf7b4a4e3124e8909a96
251 skip 9d7d07bc967ca98ad0600c24953fd289ad5fa991
251 skip 9d7d07bc967ca98ad0600c24953fd289ad5fa991
252 skip ce8f0998e922c179e80819d5066fbe46e2998784
252 skip ce8f0998e922c179e80819d5066fbe46e2998784
253 skip e7fa0811edb063f6319531f0d0a865882138e180
253 skip e7fa0811edb063f6319531f0d0a865882138e180
254 skip a2e6ea4973e9196ddd3386493b0c214b41fd97d3
254 skip a2e6ea4973e9196ddd3386493b0c214b41fd97d3
255
255
256 bisect reverse test
256 bisect reverse test
257
257
258 $ hg bisect -r
258 $ hg bisect -r
259 $ hg bisect -b null
259 $ hg bisect -b null
260 $ hg bisect -g tip
260 $ hg bisect -g tip
261 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
261 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
262 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
263 $ hg bisect -g
263 $ hg bisect -g
264 Testing changeset 7:03750880c6b5 (16 changesets remaining, ~4 tests)
264 Testing changeset 7:03750880c6b5 (16 changesets remaining, ~4 tests)
265 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
265 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
266
266
267 skip
267 skip
268
268
269 $ hg bisect -s
269 $ hg bisect -s
270 Testing changeset 6:a3d5c6fdf0d3 (16 changesets remaining, ~4 tests)
270 Testing changeset 6:a3d5c6fdf0d3 (16 changesets remaining, ~4 tests)
271 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
271 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
272 $ hg bisect -g
272 $ hg bisect -g
273 Testing changeset 2:db07c04beaca (7 changesets remaining, ~2 tests)
273 Testing changeset 2:db07c04beaca (7 changesets remaining, ~2 tests)
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 $ hg bisect -g
275 $ hg bisect -g
276 Testing changeset 0:b99c7b9c8e11 (3 changesets remaining, ~1 tests)
276 Testing changeset 0:b99c7b9c8e11 (3 changesets remaining, ~1 tests)
277 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
277 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 $ hg bisect -b
278 $ hg bisect -b
279 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests)
279 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests)
280 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
280 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
281 $ hg bisect -g
281 $ hg bisect -g
282 The first good revision is:
282 The first good revision is:
283 changeset: 1:5cd978ea5149
283 changeset: 1:5cd978ea5149
284 user: test
284 user: test
285 date: Thu Jan 01 00:00:01 1970 +0000
285 date: Thu Jan 01 00:00:01 1970 +0000
286 summary: msg 1
286 summary: msg 1
287
287
288
288
289 $ hg bisect -r
289 $ hg bisect -r
290 $ hg bisect -g tip
290 $ hg bisect -g tip
291 $ hg bisect -b tip
291 $ hg bisect -b tip
292 abort: inconsistent state, 31:58c80a7c8a40 is good and bad
292 abort: inconsistent state, 31:58c80a7c8a40 is good and bad
293 [255]
293 [255]
294
294
295 $ hg bisect -r
295 $ hg bisect -r
296 $ hg bisect -g null
296 $ hg bisect -g null
297 $ hg bisect -bU tip
297 $ hg bisect -bU tip
298 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
298 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
299 $ hg id
299 $ hg id
300 5cd978ea5149
300 5cd978ea5149
301
301
302
302
303 Issue1228: hg bisect crashes when you skip the last rev in bisection
303 Issue1228: hg bisect crashes when you skip the last rev in bisection
304 Issue1182: hg bisect exception
304 Issue1182: hg bisect exception
305
305
306 $ hg bisect -r
306 $ hg bisect -r
307 $ hg bisect -b 4
307 $ hg bisect -b 4
308 $ hg bisect -g 0
308 $ hg bisect -g 0
309 Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests)
309 Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests)
310 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
310 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
311 $ hg bisect -s
311 $ hg bisect -s
312 Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests)
312 Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests)
313 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
313 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
314 $ hg bisect -s
314 $ hg bisect -s
315 Testing changeset 3:b53bea5e2fcb (4 changesets remaining, ~2 tests)
315 Testing changeset 3:b53bea5e2fcb (4 changesets remaining, ~2 tests)
316 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
316 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
317 $ hg bisect -s
317 $ hg bisect -s
318 Due to skipped revisions, the first bad revision could be any of:
318 Due to skipped revisions, the first bad revision could be any of:
319 changeset: 1:5cd978ea5149
319 changeset: 1:5cd978ea5149
320 user: test
320 user: test
321 date: Thu Jan 01 00:00:01 1970 +0000
321 date: Thu Jan 01 00:00:01 1970 +0000
322 summary: msg 1
322 summary: msg 1
323
323
324 changeset: 2:db07c04beaca
324 changeset: 2:db07c04beaca
325 user: test
325 user: test
326 date: Thu Jan 01 00:00:02 1970 +0000
326 date: Thu Jan 01 00:00:02 1970 +0000
327 summary: msg 2
327 summary: msg 2
328
328
329 changeset: 3:b53bea5e2fcb
329 changeset: 3:b53bea5e2fcb
330 user: test
330 user: test
331 date: Thu Jan 01 00:00:03 1970 +0000
331 date: Thu Jan 01 00:00:03 1970 +0000
332 summary: msg 3
332 summary: msg 3
333
333
334 changeset: 4:9b2ba8336a65
334 changeset: 4:9b2ba8336a65
335 user: test
335 user: test
336 date: Thu Jan 01 00:00:04 1970 +0000
336 date: Thu Jan 01 00:00:04 1970 +0000
337 summary: msg 4
337 summary: msg 4
338
338
339
339
340
340
341 reproduce non converging bisect, issue1182
341 reproduce non converging bisect, issue1182
342
342
343 $ hg bisect -r
343 $ hg bisect -r
344 $ hg bisect -g 0
344 $ hg bisect -g 0
345 $ hg bisect -b 2
345 $ hg bisect -b 2
346 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests)
346 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests)
347 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
347 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
348 $ hg bisect -s
348 $ hg bisect -s
349 Due to skipped revisions, the first bad revision could be any of:
349 Due to skipped revisions, the first bad revision could be any of:
350 changeset: 1:5cd978ea5149
350 changeset: 1:5cd978ea5149
351 user: test
351 user: test
352 date: Thu Jan 01 00:00:01 1970 +0000
352 date: Thu Jan 01 00:00:01 1970 +0000
353 summary: msg 1
353 summary: msg 1
354
354
355 changeset: 2:db07c04beaca
355 changeset: 2:db07c04beaca
356 user: test
356 user: test
357 date: Thu Jan 01 00:00:02 1970 +0000
357 date: Thu Jan 01 00:00:02 1970 +0000
358 summary: msg 2
358 summary: msg 2
359
359
360
360
361
361
362 test no action
362 test no action
363
363
364 $ hg bisect -r
364 $ hg bisect -r
365 $ hg bisect
365 $ hg bisect
366 abort: cannot bisect (no known good revisions)
366 abort: cannot bisect (no known good revisions)
367 [255]
367 [20]
368
368
369
369
370 reproduce AssertionError, issue1445
370 reproduce AssertionError, issue1445
371
371
372 $ hg bisect -r
372 $ hg bisect -r
373 $ hg bisect -b 6
373 $ hg bisect -b 6
374 $ hg bisect -g 0
374 $ hg bisect -g 0
375 Testing changeset 3:b53bea5e2fcb (6 changesets remaining, ~2 tests)
375 Testing changeset 3:b53bea5e2fcb (6 changesets remaining, ~2 tests)
376 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
376 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
377 $ hg bisect -s
377 $ hg bisect -s
378 Testing changeset 2:db07c04beaca (6 changesets remaining, ~2 tests)
378 Testing changeset 2:db07c04beaca (6 changesets remaining, ~2 tests)
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 $ hg bisect -s
380 $ hg bisect -s
381 Testing changeset 4:9b2ba8336a65 (6 changesets remaining, ~2 tests)
381 Testing changeset 4:9b2ba8336a65 (6 changesets remaining, ~2 tests)
382 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
382 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
383 $ hg bisect -s
383 $ hg bisect -s
384 Testing changeset 1:5cd978ea5149 (6 changesets remaining, ~2 tests)
384 Testing changeset 1:5cd978ea5149 (6 changesets remaining, ~2 tests)
385 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
385 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
386 $ hg bisect -s
386 $ hg bisect -s
387 Testing changeset 5:7874a09ea728 (6 changesets remaining, ~2 tests)
387 Testing changeset 5:7874a09ea728 (6 changesets remaining, ~2 tests)
388 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
388 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
389 $ hg bisect -g
389 $ hg bisect -g
390 The first bad revision is:
390 The first bad revision is:
391 changeset: 6:a3d5c6fdf0d3
391 changeset: 6:a3d5c6fdf0d3
392 user: test
392 user: test
393 date: Thu Jan 01 00:00:06 1970 +0000
393 date: Thu Jan 01 00:00:06 1970 +0000
394 summary: msg 6
394 summary: msg 6
395
395
396 $ hg log -r "bisect(good)"
396 $ hg log -r "bisect(good)"
397 changeset: 0:b99c7b9c8e11
397 changeset: 0:b99c7b9c8e11
398 user: test
398 user: test
399 date: Thu Jan 01 00:00:00 1970 +0000
399 date: Thu Jan 01 00:00:00 1970 +0000
400 summary: msg 0
400 summary: msg 0
401
401
402 changeset: 5:7874a09ea728
402 changeset: 5:7874a09ea728
403 user: test
403 user: test
404 date: Thu Jan 01 00:00:05 1970 +0000
404 date: Thu Jan 01 00:00:05 1970 +0000
405 summary: msg 5
405 summary: msg 5
406
406
407 $ hg log -r "bisect(bad)"
407 $ hg log -r "bisect(bad)"
408 changeset: 6:a3d5c6fdf0d3
408 changeset: 6:a3d5c6fdf0d3
409 user: test
409 user: test
410 date: Thu Jan 01 00:00:06 1970 +0000
410 date: Thu Jan 01 00:00:06 1970 +0000
411 summary: msg 6
411 summary: msg 6
412
412
413 $ hg log -r "bisect(current)"
413 $ hg log -r "bisect(current)"
414 changeset: 5:7874a09ea728
414 changeset: 5:7874a09ea728
415 user: test
415 user: test
416 date: Thu Jan 01 00:00:05 1970 +0000
416 date: Thu Jan 01 00:00:05 1970 +0000
417 summary: msg 5
417 summary: msg 5
418
418
419 $ hg log -r "bisect(skip)"
419 $ hg log -r "bisect(skip)"
420 changeset: 1:5cd978ea5149
420 changeset: 1:5cd978ea5149
421 user: test
421 user: test
422 date: Thu Jan 01 00:00:01 1970 +0000
422 date: Thu Jan 01 00:00:01 1970 +0000
423 summary: msg 1
423 summary: msg 1
424
424
425 changeset: 2:db07c04beaca
425 changeset: 2:db07c04beaca
426 user: test
426 user: test
427 date: Thu Jan 01 00:00:02 1970 +0000
427 date: Thu Jan 01 00:00:02 1970 +0000
428 summary: msg 2
428 summary: msg 2
429
429
430 changeset: 3:b53bea5e2fcb
430 changeset: 3:b53bea5e2fcb
431 user: test
431 user: test
432 date: Thu Jan 01 00:00:03 1970 +0000
432 date: Thu Jan 01 00:00:03 1970 +0000
433 summary: msg 3
433 summary: msg 3
434
434
435 changeset: 4:9b2ba8336a65
435 changeset: 4:9b2ba8336a65
436 user: test
436 user: test
437 date: Thu Jan 01 00:00:04 1970 +0000
437 date: Thu Jan 01 00:00:04 1970 +0000
438 summary: msg 4
438 summary: msg 4
439
439
440
440
441 test legacy bisected() keyword
441 test legacy bisected() keyword
442
442
443 $ hg log -r "bisected(bad)"
443 $ hg log -r "bisected(bad)"
444 changeset: 6:a3d5c6fdf0d3
444 changeset: 6:a3d5c6fdf0d3
445 user: test
445 user: test
446 date: Thu Jan 01 00:00:06 1970 +0000
446 date: Thu Jan 01 00:00:06 1970 +0000
447 summary: msg 6
447 summary: msg 6
448
448
449
449
450 $ set +e
450 $ set +e
451
451
452 test invalid command
452 test invalid command
453 assuming that the shell returns 127 if command not found ...
453 assuming that the shell returns 127 if command not found ...
454
454
455 $ hg bisect -r
455 $ hg bisect -r
456 $ hg bisect --command 'exit 127'
456 $ hg bisect --command 'exit 127'
457 abort: failed to execute exit 127
457 abort: failed to execute exit 127
458 [255]
458 [255]
459
459
460
460
461 test bisecting command
461 test bisecting command
462
462
463 $ cat > script.py <<EOF
463 $ cat > script.py <<EOF
464 > #!$PYTHON
464 > #!$PYTHON
465 > from __future__ import absolute_import
465 > from __future__ import absolute_import
466 > import sys
466 > import sys
467 > from mercurial import hg, ui as uimod
467 > from mercurial import hg, ui as uimod
468 > repo = hg.repository(uimod.ui.load(), b'.')
468 > repo = hg.repository(uimod.ui.load(), b'.')
469 > if repo[b'.'].rev() < 6:
469 > if repo[b'.'].rev() < 6:
470 > sys.exit(1)
470 > sys.exit(1)
471 > EOF
471 > EOF
472 $ chmod +x script.py
472 $ chmod +x script.py
473 $ hg bisect -r
473 $ hg bisect -r
474 $ hg up -qr tip
474 $ hg up -qr tip
475 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
475 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
476 changeset 31:58c80a7c8a40: good
476 changeset 31:58c80a7c8a40: good
477 abort: cannot bisect (no known bad revisions)
477 abort: cannot bisect (no known bad revisions)
478 [255]
478 [20]
479 $ hg up -qr 0
479 $ hg up -qr 0
480 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
480 $ hg bisect --command "\"$PYTHON\" \"$TESTTMP/script.py\" and some parameters"
481 changeset 0:b99c7b9c8e11: bad
481 changeset 0:b99c7b9c8e11: bad
482 changeset 15:e7fa0811edb0: good
482 changeset 15:e7fa0811edb0: good
483 changeset 7:03750880c6b5: good
483 changeset 7:03750880c6b5: good
484 changeset 3:b53bea5e2fcb: bad
484 changeset 3:b53bea5e2fcb: bad
485 changeset 5:7874a09ea728: bad
485 changeset 5:7874a09ea728: bad
486 changeset 6:a3d5c6fdf0d3: good
486 changeset 6:a3d5c6fdf0d3: good
487 The first good revision is:
487 The first good revision is:
488 changeset: 6:a3d5c6fdf0d3
488 changeset: 6:a3d5c6fdf0d3
489 user: test
489 user: test
490 date: Thu Jan 01 00:00:06 1970 +0000
490 date: Thu Jan 01 00:00:06 1970 +0000
491 summary: msg 6
491 summary: msg 6
492
492
493
493
494
494
495 test bisecting via a command without updating the working dir, and
495 test bisecting via a command without updating the working dir, and
496 ensure that the bisect state file is updated before running a test
496 ensure that the bisect state file is updated before running a test
497 command
497 command
498
498
499 $ hg update null
499 $ hg update null
500 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
500 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
501 $ cat > script.sh <<'EOF'
501 $ cat > script.sh <<'EOF'
502 > #!/bin/sh
502 > #!/bin/sh
503 > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127)
503 > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127)
504 > current="`hg log -r \"bisect(current)\" --template {node}`"
504 > current="`hg log -r \"bisect(current)\" --template {node}`"
505 > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127)
505 > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127)
506 > rev="`hg log -r $HG_NODE --template {rev}`"
506 > rev="`hg log -r $HG_NODE --template {rev}`"
507 > test "$rev" -ge 6
507 > test "$rev" -ge 6
508 > EOF
508 > EOF
509 $ chmod +x script.sh
509 $ chmod +x script.sh
510 $ hg bisect -r
510 $ hg bisect -r
511 $ hg bisect --good tip --noupdate
511 $ hg bisect --good tip --noupdate
512 $ hg bisect --bad 0 --noupdate
512 $ hg bisect --bad 0 --noupdate
513 Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
513 Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
514 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" --noupdate
514 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params" --noupdate
515 changeset 15:e7fa0811edb0: good
515 changeset 15:e7fa0811edb0: good
516 changeset 7:03750880c6b5: good
516 changeset 7:03750880c6b5: good
517 changeset 3:b53bea5e2fcb: bad
517 changeset 3:b53bea5e2fcb: bad
518 changeset 5:7874a09ea728: bad
518 changeset 5:7874a09ea728: bad
519 changeset 6:a3d5c6fdf0d3: good
519 changeset 6:a3d5c6fdf0d3: good
520 The first good revision is:
520 The first good revision is:
521 changeset: 6:a3d5c6fdf0d3
521 changeset: 6:a3d5c6fdf0d3
522 user: test
522 user: test
523 date: Thu Jan 01 00:00:06 1970 +0000
523 date: Thu Jan 01 00:00:06 1970 +0000
524 summary: msg 6
524 summary: msg 6
525
525
526
526
527 ensure that we still don't have a working dir
527 ensure that we still don't have a working dir
528
528
529 $ hg parents
529 $ hg parents
530
530
531
531
532 test the same case, this time with updating
532 test the same case, this time with updating
533
533
534 $ cat > script.sh <<'EOF'
534 $ cat > script.sh <<'EOF'
535 > #!/bin/sh
535 > #!/bin/sh
536 > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127)
536 > test -n "$HG_NODE" || (echo HG_NODE missing; exit 127)
537 > current="`hg log -r \"bisect(current)\" --template {node}`"
537 > current="`hg log -r \"bisect(current)\" --template {node}`"
538 > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127)
538 > test "$current" = "$HG_NODE" || (echo current is bad: $current; exit 127)
539 > rev="`hg log -r . --template {rev}`"
539 > rev="`hg log -r . --template {rev}`"
540 > test "$rev" -ge 6
540 > test "$rev" -ge 6
541 > EOF
541 > EOF
542 $ chmod +x script.sh
542 $ chmod +x script.sh
543 $ hg bisect -r
543 $ hg bisect -r
544 $ hg up -qr tip
544 $ hg up -qr tip
545 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
545 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
546 changeset 31:58c80a7c8a40: good
546 changeset 31:58c80a7c8a40: good
547 abort: cannot bisect (no known bad revisions)
547 abort: cannot bisect (no known bad revisions)
548 [255]
548 [20]
549 $ hg up -qr 0
549 $ hg up -qr 0
550 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
550 $ hg bisect --command "sh \"$TESTTMP/script.sh\" and some params"
551 changeset 0:b99c7b9c8e11: bad
551 changeset 0:b99c7b9c8e11: bad
552 changeset 15:e7fa0811edb0: good
552 changeset 15:e7fa0811edb0: good
553 changeset 7:03750880c6b5: good
553 changeset 7:03750880c6b5: good
554 changeset 3:b53bea5e2fcb: bad
554 changeset 3:b53bea5e2fcb: bad
555 changeset 5:7874a09ea728: bad
555 changeset 5:7874a09ea728: bad
556 changeset 6:a3d5c6fdf0d3: good
556 changeset 6:a3d5c6fdf0d3: good
557 The first good revision is:
557 The first good revision is:
558 changeset: 6:a3d5c6fdf0d3
558 changeset: 6:a3d5c6fdf0d3
559 user: test
559 user: test
560 date: Thu Jan 01 00:00:06 1970 +0000
560 date: Thu Jan 01 00:00:06 1970 +0000
561 summary: msg 6
561 summary: msg 6
562
562
563 $ hg graft -q 15
563 $ hg graft -q 15
564 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
564 warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
565 abort: unresolved conflicts, can't continue
565 abort: unresolved conflicts, can't continue
566 (use 'hg resolve' and 'hg graft --continue')
566 (use 'hg resolve' and 'hg graft --continue')
567 [1]
567 [1]
568 $ hg bisect --reset
568 $ hg bisect --reset
569 $ hg up -C .
569 $ hg up -C .
570 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
570 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
571
571
572 Check that bisect does not break on obsolete changesets
572 Check that bisect does not break on obsolete changesets
573 =========================================================
573 =========================================================
574
574
575 $ cat >> $HGRCPATH << EOF
575 $ cat >> $HGRCPATH << EOF
576 > [experimental]
576 > [experimental]
577 > evolution.createmarkers=True
577 > evolution.createmarkers=True
578 > EOF
578 > EOF
579
579
580 tip is obsolete
580 tip is obsolete
581 ---------------------
581 ---------------------
582
582
583 $ hg debugobsolete `hg id --debug -i -r tip`
583 $ hg debugobsolete `hg id --debug -i -r tip`
584 1 new obsolescence markers
584 1 new obsolescence markers
585 obsoleted 1 changesets
585 obsoleted 1 changesets
586 $ hg bisect --reset
586 $ hg bisect --reset
587 $ hg bisect --good 15
587 $ hg bisect --good 15
588 $ hg bisect --bad 30
588 $ hg bisect --bad 30
589 Testing changeset 22:06c7993750ce (15 changesets remaining, ~3 tests)
589 Testing changeset 22:06c7993750ce (15 changesets remaining, ~3 tests)
590 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
590 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
591 $ hg bisect --command true
591 $ hg bisect --command true
592 changeset 22:06c7993750ce: good
592 changeset 22:06c7993750ce: good
593 changeset 26:3efc6fd51aeb: good
593 changeset 26:3efc6fd51aeb: good
594 changeset 28:8e0c2264c8af: good
594 changeset 28:8e0c2264c8af: good
595 changeset 29:b5bd63375ab9: good
595 changeset 29:b5bd63375ab9: good
596 The first bad revision is:
596 The first bad revision is:
597 changeset: 30:ed2d2f24b11c
597 changeset: 30:ed2d2f24b11c
598 tag: tip
598 tag: tip
599 user: test
599 user: test
600 date: Thu Jan 01 00:00:30 1970 +0000
600 date: Thu Jan 01 00:00:30 1970 +0000
601 summary: msg 30
601 summary: msg 30
602
602
603
603
604 Rewritten commits should not crash
604 Rewritten commits should not crash
605
605
606 $ hg co 29
606 $ hg co 29
607 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
607 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
608 $ hg revert --all -r 30
608 $ hg revert --all -r 30
609 reverting a
609 reverting a
610 $ hg commit -m 'msg 30 -- fixed'
610 $ hg commit -m 'msg 30 -- fixed'
611 created new head
611 created new head
612 $ hg debugobsolete `hg id --debug -i -r 30` `hg id --debug -i -r .`
612 $ hg debugobsolete `hg id --debug -i -r 30` `hg id --debug -i -r .`
613 1 new obsolescence markers
613 1 new obsolescence markers
614 obsoleted 1 changesets
614 obsoleted 1 changesets
615 $ hg bisect
615 $ hg bisect
616 The first bad revision is:
616 The first bad revision is:
617 changeset: 30:ed2d2f24b11c
617 changeset: 30:ed2d2f24b11c
618 user: test
618 user: test
619 date: Thu Jan 01 00:00:30 1970 +0000
619 date: Thu Jan 01 00:00:30 1970 +0000
620 obsolete: rewritten as 32:8a638ebd1122
620 obsolete: rewritten as 32:8a638ebd1122
621 summary: msg 30
621 summary: msg 30
622
622
623
623
624 Log template does not crash
624 Log template does not crash
625
625
626 $ hg log -GTbisect -r 15::
626 $ hg log -GTbisect -r 15::
627 @ changeset: 32:8a638ebd1122
627 @ changeset: 32:8a638ebd1122
628 | bisect: good (implicit)
628 | bisect: good (implicit)
629 | tag: tip
629 | tag: tip
630 | parent: 29:b5bd63375ab9
630 | parent: 29:b5bd63375ab9
631 | user: test
631 | user: test
632 | date: Thu Jan 01 00:00:00 1970 +0000
632 | date: Thu Jan 01 00:00:00 1970 +0000
633 | summary: msg 30 -- fixed
633 | summary: msg 30 -- fixed
634 |
634 |
635 o changeset: 29:b5bd63375ab9
635 o changeset: 29:b5bd63375ab9
636 | bisect: good
636 | bisect: good
637 | user: test
637 | user: test
638 | date: Thu Jan 01 00:00:29 1970 +0000
638 | date: Thu Jan 01 00:00:29 1970 +0000
639 | summary: msg 29
639 | summary: msg 29
640 |
640 |
641 o changeset: 28:8e0c2264c8af
641 o changeset: 28:8e0c2264c8af
642 | bisect: good
642 | bisect: good
643 | user: test
643 | user: test
644 | date: Thu Jan 01 00:00:28 1970 +0000
644 | date: Thu Jan 01 00:00:28 1970 +0000
645 | summary: msg 28
645 | summary: msg 28
646 |
646 |
647 o changeset: 27:288867a866e9
647 o changeset: 27:288867a866e9
648 | bisect: ignored
648 | bisect: ignored
649 | user: test
649 | user: test
650 | date: Thu Jan 01 00:00:27 1970 +0000
650 | date: Thu Jan 01 00:00:27 1970 +0000
651 | summary: msg 27
651 | summary: msg 27
652 |
652 |
653 o changeset: 26:3efc6fd51aeb
653 o changeset: 26:3efc6fd51aeb
654 | bisect: good
654 | bisect: good
655 | user: test
655 | user: test
656 | date: Thu Jan 01 00:00:26 1970 +0000
656 | date: Thu Jan 01 00:00:26 1970 +0000
657 | summary: msg 26
657 | summary: msg 26
658 |
658 |
659 o changeset: 25:02a84173a97a
659 o changeset: 25:02a84173a97a
660 | bisect: ignored
660 | bisect: ignored
661 | user: test
661 | user: test
662 | date: Thu Jan 01 00:00:25 1970 +0000
662 | date: Thu Jan 01 00:00:25 1970 +0000
663 | summary: msg 25
663 | summary: msg 25
664 |
664 |
665 o changeset: 24:10e0acd3809e
665 o changeset: 24:10e0acd3809e
666 | bisect: ignored
666 | bisect: ignored
667 | user: test
667 | user: test
668 | date: Thu Jan 01 00:00:24 1970 +0000
668 | date: Thu Jan 01 00:00:24 1970 +0000
669 | summary: msg 24
669 | summary: msg 24
670 |
670 |
671 o changeset: 23:5ec79163bff4
671 o changeset: 23:5ec79163bff4
672 | bisect: ignored
672 | bisect: ignored
673 | user: test
673 | user: test
674 | date: Thu Jan 01 00:00:23 1970 +0000
674 | date: Thu Jan 01 00:00:23 1970 +0000
675 | summary: msg 23
675 | summary: msg 23
676 |
676 |
677 o changeset: 22:06c7993750ce
677 o changeset: 22:06c7993750ce
678 | bisect: good
678 | bisect: good
679 | user: test
679 | user: test
680 | date: Thu Jan 01 00:00:22 1970 +0000
680 | date: Thu Jan 01 00:00:22 1970 +0000
681 | summary: msg 22
681 | summary: msg 22
682 |
682 |
683 o changeset: 21:e5db6aa3fe2a
683 o changeset: 21:e5db6aa3fe2a
684 | bisect: ignored
684 | bisect: ignored
685 | user: test
685 | user: test
686 | date: Thu Jan 01 00:00:21 1970 +0000
686 | date: Thu Jan 01 00:00:21 1970 +0000
687 | summary: msg 21
687 | summary: msg 21
688 |
688 |
689 o changeset: 20:7128fb4fdbc9
689 o changeset: 20:7128fb4fdbc9
690 | bisect: ignored
690 | bisect: ignored
691 | user: test
691 | user: test
692 | date: Thu Jan 01 00:00:20 1970 +0000
692 | date: Thu Jan 01 00:00:20 1970 +0000
693 | summary: msg 20
693 | summary: msg 20
694 |
694 |
695 o changeset: 19:52798545b482
695 o changeset: 19:52798545b482
696 | bisect: ignored
696 | bisect: ignored
697 | user: test
697 | user: test
698 | date: Thu Jan 01 00:00:19 1970 +0000
698 | date: Thu Jan 01 00:00:19 1970 +0000
699 | summary: msg 19
699 | summary: msg 19
700 |
700 |
701 o changeset: 18:86977a90077e
701 o changeset: 18:86977a90077e
702 | bisect: ignored
702 | bisect: ignored
703 | user: test
703 | user: test
704 | date: Thu Jan 01 00:00:18 1970 +0000
704 | date: Thu Jan 01 00:00:18 1970 +0000
705 | summary: msg 18
705 | summary: msg 18
706 |
706 |
707 o changeset: 17:03515f4a9080
707 o changeset: 17:03515f4a9080
708 | bisect: ignored
708 | bisect: ignored
709 | user: test
709 | user: test
710 | date: Thu Jan 01 00:00:17 1970 +0000
710 | date: Thu Jan 01 00:00:17 1970 +0000
711 | summary: msg 17
711 | summary: msg 17
712 |
712 |
713 o changeset: 16:a2e6ea4973e9
713 o changeset: 16:a2e6ea4973e9
714 | bisect: ignored
714 | bisect: ignored
715 | user: test
715 | user: test
716 | date: Thu Jan 01 00:00:16 1970 +0000
716 | date: Thu Jan 01 00:00:16 1970 +0000
717 | summary: msg 16
717 | summary: msg 16
718 |
718 |
719 o changeset: 15:e7fa0811edb0
719 o changeset: 15:e7fa0811edb0
720 | bisect: good
720 | bisect: good
721 ~ user: test
721 ~ user: test
722 date: Thu Jan 01 00:00:15 1970 +0000
722 date: Thu Jan 01 00:00:15 1970 +0000
723 summary: msg 15
723 summary: msg 15
724
724
725 $ hg debugobsolete --delete `hg debugobsolete --index -T'{index}\n' | tail -1`
725 $ hg debugobsolete --delete `hg debugobsolete --index -T'{index}\n' | tail -1`
726 deleted 1 obsolescence markers
726 deleted 1 obsolescence markers
727
727
728 Changeset in the bad:good range is obsolete
728 Changeset in the bad:good range is obsolete
729 ---------------------------------------------
729 ---------------------------------------------
730
730
731 $ hg up 30
731 $ hg up 30
732 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
732 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
733 $ echo 'a' >> a
733 $ echo 'a' >> a
734 $ hg ci -m "msg 32" -d "32 0"
734 $ hg ci -m "msg 32" -d "32 0"
735 $ hg bisect --reset
735 $ hg bisect --reset
736 $ hg bisect --good .
736 $ hg bisect --good .
737 $ hg bisect --bad 25
737 $ hg bisect --bad 25
738 Testing changeset 28:8e0c2264c8af (6 changesets remaining, ~2 tests)
738 Testing changeset 28:8e0c2264c8af (6 changesets remaining, ~2 tests)
739 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
739 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
740 $ hg bisect --command true
740 $ hg bisect --command true
741 changeset 28:8e0c2264c8af: good
741 changeset 28:8e0c2264c8af: good
742 changeset 26:3efc6fd51aeb: good
742 changeset 26:3efc6fd51aeb: good
743 The first good revision is:
743 The first good revision is:
744 changeset: 26:3efc6fd51aeb
744 changeset: 26:3efc6fd51aeb
745 user: test
745 user: test
746 date: Thu Jan 01 00:00:26 1970 +0000
746 date: Thu Jan 01 00:00:26 1970 +0000
747 summary: msg 26
747 summary: msg 26
748
748
749 Test the validation message when exclusive options are used:
749 Test the validation message when exclusive options are used:
750
750
751 $ hg bisect -r
751 $ hg bisect -r
752 $ hg bisect -b -c false
752 $ hg bisect -b -c false
753 abort: --bad and --command are incompatible
753 abort: --bad and --command are incompatible
754 [10]
754 [10]
755 $ hg bisect -b -e
755 $ hg bisect -b -e
756 abort: --bad and --extend are incompatible
756 abort: --bad and --extend are incompatible
757 [10]
757 [10]
758 $ hg bisect -b -g
758 $ hg bisect -b -g
759 abort: --bad and --good are incompatible
759 abort: --bad and --good are incompatible
760 [10]
760 [10]
761 $ hg bisect -b -r
761 $ hg bisect -b -r
762 abort: --bad and --reset are incompatible
762 abort: --bad and --reset are incompatible
763 [10]
763 [10]
764 $ hg bisect -b -s
764 $ hg bisect -b -s
765 abort: --bad and --skip are incompatible
765 abort: --bad and --skip are incompatible
766 [10]
766 [10]
767 $ hg bisect -c false -e
767 $ hg bisect -c false -e
768 abort: --command and --extend are incompatible
768 abort: --command and --extend are incompatible
769 [10]
769 [10]
770 $ hg bisect -c false -g
770 $ hg bisect -c false -g
771 abort: --command and --good are incompatible
771 abort: --command and --good are incompatible
772 [10]
772 [10]
773 $ hg bisect -c false -r
773 $ hg bisect -c false -r
774 abort: --command and --reset are incompatible
774 abort: --command and --reset are incompatible
775 [10]
775 [10]
776 $ hg bisect -c false -s
776 $ hg bisect -c false -s
777 abort: --command and --skip are incompatible
777 abort: --command and --skip are incompatible
778 [10]
778 [10]
779 $ hg bisect -e -g
779 $ hg bisect -e -g
780 abort: --extend and --good are incompatible
780 abort: --extend and --good are incompatible
781 [10]
781 [10]
782 $ hg bisect -e -r
782 $ hg bisect -e -r
783 abort: --extend and --reset are incompatible
783 abort: --extend and --reset are incompatible
784 [10]
784 [10]
785 $ hg bisect -e -s
785 $ hg bisect -e -s
786 abort: --extend and --skip are incompatible
786 abort: --extend and --skip are incompatible
787 [10]
787 [10]
788 $ hg bisect -g -r
788 $ hg bisect -g -r
789 abort: --good and --reset are incompatible
789 abort: --good and --reset are incompatible
790 [10]
790 [10]
791 $ hg bisect -g -s
791 $ hg bisect -g -s
792 abort: --good and --skip are incompatible
792 abort: --good and --skip are incompatible
793 [10]
793 [10]
794 $ hg bisect -r -s
794 $ hg bisect -r -s
795 abort: --reset and --skip are incompatible
795 abort: --reset and --skip are incompatible
796 [10]
796 [10]
General Comments 0
You need to be logged in to leave comments. Login now