##// 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 288 reset = True
289 289 elif extra or good + bad + skip + reset > 1:
290 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 292 if reset:
296 293 p = repo.join("bisect.state")
@@ -329,7 +326,12 b' def bisect(ui, repo, rev=None, extra=Non'
329 326 del wlock
330 327
331 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 336 # actually bisect
335 337 nodes, changesets, good = hbisect.bisect(repo.changelog, state)
@@ -202,6 +202,8 b' def install_hg():'
202 202 os.environ["PYTHONPATH"] = pythonpath
203 203
204 204 use_correct_python()
205 global hgpkg
206 hgpkg = _hgpath()
205 207
206 208 if coverage:
207 209 vlog("# Installing coverage wrapper")
@@ -456,6 +458,16 b' BINDIR = os.path.join(INST, "bin")'
456 458 PYTHONDIR = os.path.join(INST, "lib", "python")
457 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 471 def run_children(tests):
460 472 if not options.with_hg:
461 473 install_hg()
@@ -512,6 +524,9 b' def run_children(tests):'
512 524 print "Skipped %s: %s" % (s[0], s[1])
513 525 for s in fails:
514 526 print "Failed %s: %s" % (s[0], s[1])
527
528 if hgpkg != expecthg:
529 print '# Tested unexpected mercurial: %s' % hgpkg
515 530 print "# Ran %d tests, %d skipped, %d failed." % (
516 531 tested, skipped, failed)
517 532 sys.exit(failures != 0)
@@ -525,6 +540,9 b' def run_tests(tests):'
525 540 if not options.with_hg:
526 541 install_hg()
527 542
543 if hgpkg != expecthg:
544 print '# Testing unexpected mercurial: %s' % hgpkg
545
528 546 if options.timeout > 0:
529 547 try:
530 548 signal.signal(signal.SIGALRM, alarmed)
@@ -585,6 +603,8 b' def run_tests(tests):'
585 603 print "Skipped %s: %s" % s
586 604 for s in fails:
587 605 print "Failed %s: %s" % s
606 if hgpkg != expecthg:
607 print '# Tested unexpected mercurial: %s' % hgpkg
588 608 print "# Ran %d tests, %d skipped, %d failed." % (
589 609 tested, skipped, failed)
590 610
@@ -55,10 +55,7 b' hg bisect -g null'
55 55 hg bisect -bU tip
56 56 hg id
57 57
58 echo % test no action message
59 hg bisect
60
61 # reproduce AssertionError (issue1228 and issue1182)
58 echo % reproduce AssertionError, issue1228 and issue1182
62 59 hg bisect -r
63 60 hg bisect -b 4
64 61 hg bisect -g 0
@@ -66,8 +63,12 b' hg bisect -s'
66 63 hg bisect -s
67 64 hg bisect -s
68 65
69 # reproduce non converging bisect (issue1182)
66 echo % reproduce non converging bisect, issue1182
70 67 hg bisect -r
71 68 hg bisect -g 0
72 69 hg bisect -b 2
73 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 241 error
242 242 Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests)
243 243 5cd978ea5149
244 % test no action message
245 (no action selected)
244 % reproduce AssertionError, issue1228 and issue1182
246 245 Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests)
247 246 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
248 247 Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests)
@@ -270,6 +269,7 b' user: test'
270 269 date: Thu Jan 01 00:00:04 1970 +0000
271 270 summary: msg 4
272 271
272 % reproduce non converging bisect, issue1182
273 273 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests)
274 274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 275 Due to skipped revisions, the first bad revision could be any of:
@@ -283,3 +283,5 b' user: test'
283 283 date: Thu Jan 01 00:00:02 1970 +0000
284 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