Mercurial > hg
changeset 6986:55c16f12908b
merge with crew
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 05 Sep 2008 10:39:19 +0200 |
parents | 5cf3bf3c19ba (current diff) 6c4a08270222 (diff) |
children | d09e813b21e3 a408ea9876e6 |
files | |
diffstat | 4 files changed, 36 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Fri Sep 05 10:00:57 2008 +0200 +++ b/mercurial/commands.py Fri Sep 05 10:39:19 2008 +0200 @@ -288,9 +288,6 @@ reset = True elif extra or good + bad + skip + reset > 1: raise util.Abort(_('incompatible arguments')) - elif not (good or bad or skip or reset): - ui.status(_('(no action selected)\n')) - return if reset: p = repo.join("bisect.state") @@ -329,7 +326,12 @@ del wlock if not state['good'] or not state['bad']: - return + if (good or bad or skip or reset): + return + if not state['good']: + raise util.Abort(_('cannot bisect (no known good revisions)')) + else: + raise util.Abort(_('cannot bisect (no known bad revisions)')) # actually bisect nodes, changesets, good = hbisect.bisect(repo.changelog, state)
--- a/tests/run-tests.py Fri Sep 05 10:00:57 2008 +0200 +++ b/tests/run-tests.py Fri Sep 05 10:39:19 2008 +0200 @@ -202,6 +202,8 @@ os.environ["PYTHONPATH"] = pythonpath use_correct_python() + global hgpkg + hgpkg = _hgpath() if coverage: vlog("# Installing coverage wrapper") @@ -456,6 +458,16 @@ PYTHONDIR = os.path.join(INST, "lib", "python") COVERAGE_FILE = os.path.join(TESTDIR, ".coverage") +def _hgpath(): + cmd = '%s -c "import mercurial; print mercurial.__path__[0]"' + hgpath = os.popen(cmd % python) + path = hgpath.read().strip() + hgpath.close() + return path + +expecthg = os.path.join(HGTMP, 'install', 'lib', 'python', 'mercurial') +hgpkg = None + def run_children(tests): if not options.with_hg: install_hg() @@ -512,6 +524,9 @@ print "Skipped %s: %s" % (s[0], s[1]) for s in fails: print "Failed %s: %s" % (s[0], s[1]) + + if hgpkg != expecthg: + print '# Tested unexpected mercurial: %s' % hgpkg print "# Ran %d tests, %d skipped, %d failed." % ( tested, skipped, failed) sys.exit(failures != 0) @@ -525,6 +540,9 @@ if not options.with_hg: install_hg() + if hgpkg != expecthg: + print '# Testing unexpected mercurial: %s' % hgpkg + if options.timeout > 0: try: signal.signal(signal.SIGALRM, alarmed) @@ -585,6 +603,8 @@ print "Skipped %s: %s" % s for s in fails: print "Failed %s: %s" % s + if hgpkg != expecthg: + print '# Tested unexpected mercurial: %s' % hgpkg print "# Ran %d tests, %d skipped, %d failed." % ( tested, skipped, failed)
--- a/tests/test-bisect Fri Sep 05 10:00:57 2008 +0200 +++ b/tests/test-bisect Fri Sep 05 10:39:19 2008 +0200 @@ -55,10 +55,7 @@ hg bisect -bU tip hg id -echo % test no action message -hg bisect - -# reproduce AssertionError (issue1228 and issue1182) +echo % reproduce AssertionError, issue1228 and issue1182 hg bisect -r hg bisect -b 4 hg bisect -g 0 @@ -66,8 +63,12 @@ hg bisect -s hg bisect -s -# reproduce non converging bisect (issue1182) +echo % reproduce non converging bisect, issue1182 hg bisect -r hg bisect -g 0 hg bisect -b 2 hg bisect -s + +echo % test no action +hg bisect -r +hg bisect
--- a/tests/test-bisect.out Fri Sep 05 10:00:57 2008 +0200 +++ b/tests/test-bisect.out Fri Sep 05 10:39:19 2008 +0200 @@ -241,8 +241,7 @@ error Testing changeset 15:e7fa0811edb0 (32 changesets remaining, ~5 tests) 5cd978ea5149 -% test no action message -(no action selected) +% reproduce AssertionError, issue1228 and issue1182 Testing changeset 2:db07c04beaca (4 changesets remaining, ~2 tests) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved Testing changeset 1:5cd978ea5149 (4 changesets remaining, ~2 tests) @@ -270,6 +269,7 @@ date: Thu Jan 01 00:00:04 1970 +0000 summary: msg 4 +% reproduce non converging bisect, issue1182 Testing changeset 1:5cd978ea5149 (2 changesets remaining, ~1 tests) 1 files updated, 0 files merged, 0 files removed, 0 files unresolved Due to skipped revisions, the first bad revision could be any of: @@ -283,3 +283,5 @@ date: Thu Jan 01 00:00:02 1970 +0000 summary: msg 2 +% test no action +abort: cannot bisect (no known good revisions)