##// END OF EJS Templates
Merge with crew
Matt Mackall -
r8806:14a0bdd5 merge default
parent child Browse files
Show More
@@ -339,6 +339,8 b' def bisect(ui, repo, rev=None, extra=Non'
339 339
340 340 if command:
341 341 commandpath = util.find_exe(command)
342 if commandpath is None:
343 raise util.Abort(_("cannot find executable: %s") % command)
342 344 changesets = 1
343 345 try:
344 346 while changesets:
@@ -355,9 +357,9 b' def bisect(ui, repo, rev=None, extra=Non'
355 357 raise util.Abort(_("%s killed") % command)
356 358 else:
357 359 transition = "bad"
358 node = repo.lookup(rev or '.')
359 state[transition].append(node)
360 ui.note(_('Changeset %s: %s\n') % (short(node), transition))
360 ctx = repo[rev or '.']
361 state[transition].append(ctx.node())
362 ui.status(_('Changeset %d:%s: %s\n') % (ctx, ctx, transition))
361 363 check_state(state, interactive=False)
362 364 # bisect
363 365 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
@@ -473,7 +473,7 b' class dirstate(object):'
473 473
474 474 # step 1: find all explicit files
475 475 for ff in sorted(files):
476 nf = normalize(normpath(ff), True)
476 nf = normalize(normpath(ff), False)
477 477 if nf in results:
478 478 continue
479 479
@@ -82,3 +82,25 b' hg bisect -s'
82 82 hg bisect -s
83 83 hg bisect -s
84 84 hg bisect -g
85
86 set +e
87
88 echo % test invalid command
89 hg bisect -r
90 hg bisect --command 'foobar'
91
92 echo % test bisecting command
93 cat > script.py <<EOF
94 #!/usr/bin/env python
95 import sys
96 from mercurial import ui, hg
97 repo = hg.repository(ui.ui(), '.')
98 if repo['.'].rev() < 6:
99 sys.exit(1)
100 EOF
101 chmod +x script.py
102 hg bisect -r
103 hg bisect --good tip
104 hg bisect --bad 0
105 hg bisect --command "`pwd`/script.py"
106 true
@@ -303,3 +303,19 b' user: test'
303 303 date: Thu Jan 01 00:00:06 1970 +0000
304 304 summary: msg 6
305 305
306 % test invalid command
307 abort: cannot find executable: foobar
308 % test bisecting command
309 Testing changeset 15:e7fa0811edb0 (31 changesets remaining, ~4 tests)
310 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
311 Changeset 15:e7fa0811edb0: good
312 Changeset 7:03750880c6b5: good
313 Changeset 3:b53bea5e2fcb: bad
314 Changeset 5:7874a09ea728: bad
315 Changeset 6:a3d5c6fdf0d3: good
316 The first good revision is:
317 changeset: 6:a3d5c6fdf0d3
318 user: test
319 date: Thu Jan 01 00:00:06 1970 +0000
320 summary: msg 6
321
General Comments 0
You need to be logged in to leave comments. Login now