##// END OF EJS Templates
merge with crew
Benoit Boissinot -
r6986:55c16f12 merge default
parent child Browse files
Show More
@@ -288,9 +288,6 b' def bisect(ui, repo, rev=None, extra=Non'
288 reset = True
288 reset = True
289 elif extra or good + bad + skip + reset > 1:
289 elif extra or good + bad + skip + reset > 1:
290 raise util.Abort(_('incompatible arguments'))
290 raise util.Abort(_('incompatible arguments'))
291 elif not (good or bad or skip or reset):
292 ui.status(_('(no action selected)\n'))
293 return
294
291
295 if reset:
292 if reset:
296 p = repo.join("bisect.state")
293 p = repo.join("bisect.state")
@@ -329,7 +326,12 b' def bisect(ui, repo, rev=None, extra=Non'
329 del wlock
326 del wlock
330
327
331 if not state['good'] or not state['bad']:
328 if not state['good'] or not state['bad']:
332 return
329 if (good or bad or skip or reset):
330 return
331 if not state['good']:
332 raise util.Abort(_('cannot bisect (no known good revisions)'))
333 else:
334 raise util.Abort(_('cannot bisect (no known bad revisions)'))
333
335
334 # actually bisect
336 # actually bisect
335 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
337 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
@@ -202,6 +202,8 b' def install_hg():'
202 os.environ["PYTHONPATH"] = pythonpath
202 os.environ["PYTHONPATH"] = pythonpath
203
203
204 use_correct_python()
204 use_correct_python()
205 global hgpkg
206 hgpkg = _hgpath()
205
207
206 if coverage:
208 if coverage:
207 vlog("# Installing coverage wrapper")
209 vlog("# Installing coverage wrapper")
@@ -456,6 +458,16 b' BINDIR = os.path.join(INST, "bin")'
456 PYTHONDIR = os.path.join(INST, "lib", "python")
458 PYTHONDIR = os.path.join(INST, "lib", "python")
457 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
459 COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")
458
460
461 def _hgpath():
462 cmd = '%s -c "import mercurial; print mercurial.__path__[0]"'
463 hgpath = os.popen(cmd % python)
464 path = hgpath.read().strip()
465 hgpath.close()
466 return path
467
468 expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial')
469 hgpkg = None
470
459 def run_children(tests):
471 def run_children(tests):
460 if not options.with_hg:
472 if not options.with_hg:
461 install_hg()
473 install_hg()
@@ -512,6 +524,9 b' def run_children(tests):'
512 print "Skipped %s: %s" % (s[0], s[1])
524 print "Skipped %s: %s" % (s[0], s[1])
513 for s in fails:
525 for s in fails:
514 print "Failed %s: %s" % (s[0], s[1])
526 print "Failed %s: %s" % (s[0], s[1])
527
528 if hgpkg != expecthg:
529 print '# Tested unexpected mercurial: %s' % hgpkg
515 print "# Ran %d tests, %d skipped, %d failed." % (
530 print "# Ran %d tests, %d skipped, %d failed." % (
516 tested, skipped, failed)
531 tested, skipped, failed)
517 sys.exit(failures != 0)
532 sys.exit(failures != 0)
@@ -525,6 +540,9 b' def run_tests(tests):'
525 if not options.with_hg:
540 if not options.with_hg:
526 install_hg()
541 install_hg()
527
542
543 if hgpkg != expecthg:
544 print '# Testing unexpected mercurial: %s' % hgpkg
545
528 if options.timeout > 0:
546 if options.timeout > 0:
529 try:
547 try:
530 signal.signal(signal.SIGALRM, alarmed)
548 signal.signal(signal.SIGALRM, alarmed)
@@ -585,6 +603,8 b' def run_tests(tests):'
585 print "Skipped %s: %s" % s
603 print "Skipped %s: %s" % s
586 for s in fails:
604 for s in fails:
587 print "Failed %s: %s" % s
605 print "Failed %s: %s" % s
606 if hgpkg != expecthg:
607 print '# Tested unexpected mercurial: %s' % hgpkg
588 print "# Ran %d tests, %d skipped, %d failed." % (
608 print "# Ran %d tests, %d skipped, %d failed." % (
589 tested, skipped, failed)
609 tested, skipped, failed)
590
610
@@ -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