##// END OF EJS Templates
bisect: only complain when nothing can be done
Dirkjan Ochtman -
r6983:5ce62598 default
parent child Browse files
Show More
@@ -286,9 +286,6 b' def bisect(ui, repo, rev=None, extra=Non'
286 reset = True
286 reset = True
287 elif extra or good + bad + skip + reset > 1:
287 elif extra or good + bad + skip + reset > 1:
288 raise util.Abort(_('incompatible arguments'))
288 raise util.Abort(_('incompatible arguments'))
289 elif not (good or bad or skip or reset):
290 ui.status(_('(no action selected)\n'))
291 return
292
289
293 if reset:
290 if reset:
294 p = repo.join("bisect.state")
291 p = repo.join("bisect.state")
@@ -327,7 +324,12 b' def bisect(ui, repo, rev=None, extra=Non'
327 del wlock
324 del wlock
328
325
329 if not state['good'] or not state['bad']:
326 if not state['good'] or not state['bad']:
330 return
327 if (good or bad or skip or reset):
328 return
329 if not state['good']:
330 raise util.Abort(_('cannot bisect (no known good revisions)'))
331 else:
332 raise util.Abort(_('cannot bisect (no known bad revisions)'))
331
333
332 # actually bisect
334 # actually bisect
333 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
335 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
@@ -55,10 +55,7 b' hg bisect -g null'
55 hg bisect -bU tip
55 hg bisect -bU tip
56 hg id
56 hg id
57
57
58 echo % test no action message
58 echo % reproduce AssertionError, issue1228 and issue1182
59 hg bisect
60
61 # reproduce AssertionError (issue1228 and issue1182)
62 hg bisect -r
59 hg bisect -r
63 hg bisect -b 4
60 hg bisect -b 4
64 hg bisect -g 0
61 hg bisect -g 0
@@ -66,8 +63,12 b' hg bisect -s'
66 hg bisect -s
63 hg bisect -s
67 hg bisect -s
64 hg bisect -s
68
65
69 # reproduce non converging bisect (issue1182)
66 echo % reproduce non converging bisect, issue1182
70 hg bisect -r
67 hg bisect -r
71 hg bisect -g 0
68 hg bisect -g 0
72 hg bisect -b 2
69 hg bisect -b 2
73 hg bisect -s
70 hg bisect -s
71
72 echo % test no action
73 hg bisect -r
74 hg bisect
@@ -241,8 +241,7 b' abort: Inconsistent state, 31:58c80a7c8a'
241 error
241 error
242 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
242 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
243 5cd978ea5149
243 5cd978ea5149
244 % test no action message
244 % reproduce AssertionError, issue1228 and issue1182
245 (no action selected)
246 Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests)
245 Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests)
247 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
246 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
248 Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests)
247 Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests)
@@ -270,6 +269,7 b' user: test'
270 date: Thu Jan 01 00:00:04 1970 +0000
269 date: Thu Jan 01 00:00:04 1970 +0000
271 summary: msg 4
270 summary: msg 4
272
271
272 % reproduce non converging bisect, issue1182
273 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests)
273 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 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 Due to skipped revisions, the first bad revision could be any of:
275 Due to skipped revisions, the first bad revision could be any of:
@@ -283,3 +283,5 b' user: test'
283 date: Thu Jan 01 00:00:02 1970 +0000
283 date: Thu Jan 01 00:00:02 1970 +0000
284 summary: msg 2
284 summary: msg 2
285
285
286 % test no action
287 abort: cannot bisect (no known good revisions)
General Comments 0
You need to be logged in to leave comments. Login now