# HG changeset patch # User Brendan Cully # Date 1224361366 25200 # Node ID 2bbdae4f39d13f068075eaea5b6e9a3fa1a30dac # Parent 88f1b8081f1c30abe223f19dcc261ed95884fa2a# Parent 8d1bdaf842de8d3b977770d6bb09852b2f33f501 Merge with crew diff -r 88f1b8081f1c -r 2bbdae4f39d1 mercurial/util.py --- a/mercurial/util.py Sat Oct 18 13:22:29 2008 -0700 +++ b/mercurial/util.py Sat Oct 18 13:22:46 2008 -0700 @@ -865,7 +865,9 @@ # handle directory not found in Python version prior to 2.5 # Python <= 2.4 returns native Windows code 3 in errno # Python >= 2.5 returns ENOENT and adds winerror field - if err.errno not in (3, errno.ENOENT, errno.ENOTDIR): + # EINVAL is raised if dir is not a directory. + if err.errno not in (3, errno.ENOENT, errno.EINVAL, + errno.ENOTDIR): raise dmap = {} cache = dircache.setdefault(dir, dmap) diff -r 88f1b8081f1c -r 2bbdae4f39d1 mercurial/verify.py --- a/mercurial/verify.py Sat Oct 18 13:22:29 2008 -0700 +++ b/mercurial/verify.py Sat Oct 18 13:22:46 2008 -0700 @@ -28,6 +28,9 @@ cl = repo.changelog mf = repo.manifest + if not repo.cancopy(): + raise util.Abort(_("cannot verify bundle or remote repos")) + def err(linkrev, msg, filename=None): if linkrev != None: badrevs[linkrev] = True diff -r 88f1b8081f1c -r 2bbdae4f39d1 tests/run-tests.py --- a/tests/run-tests.py Sat Oct 18 13:22:29 2008 -0700 +++ b/tests/run-tests.py Sat Oct 18 13:22:46 2008 -0700 @@ -176,7 +176,7 @@ # Run installer in hg root os.chdir(os.path.join(os.path.dirname(sys.argv[0]), '..')) cmd = ('%s setup.py clean --all' - ' install --force --home="%s" --install-lib="%s"' + ' install --force --prefix="%s" --install-lib="%s"' ' --install-scripts="%s" >%s 2>&1' % (sys.executable, INST, PYTHONDIR, BINDIR, installerrs)) vlog("# Running", cmd) diff -r 88f1b8081f1c -r 2bbdae4f39d1 tests/test-bundle --- a/tests/test-bundle Sat Oct 18 13:22:29 2008 -0700 +++ b/tests/test-bundle Sat Oct 18 13:22:46 2008 -0700 @@ -129,3 +129,14 @@ cd ../orig hg incoming ../bundle.hg cd .. + +# test for http://www.selenic.com/mercurial/bts/issue1144 +echo "===== test that verify bundle does not traceback" +# partial history bundle, fails w/ unkown parent +hg -R bundle.hg verify +# full history bundle, refuses to verify non-local repo +hg -R all.hg verify +# but, regular verify must continue to work +hg -R orig verify + + diff -r 88f1b8081f1c -r 2bbdae4f39d1 tests/test-bundle.out --- a/tests/test-bundle.out Sat Oct 18 13:22:29 2008 -0700 +++ b/tests/test-bundle.out Sat Oct 18 13:22:46 2008 -0700 @@ -309,3 +309,11 @@ date: Thu Jan 01 00:00:00 1970 +0000 summary: change foo +===== test that verify bundle does not traceback +abort: 00changelog.i@bbd179dfa0a7: unknown parent! +abort: cannot verify bundle or remote repos +checking changesets +checking manifests +crosschecking files in changesets and manifests +checking files +2 files, 2 changesets, 2 total revisions diff -r 88f1b8081f1c -r 2bbdae4f39d1 tests/test-permissions --- a/tests/test-permissions Sat Oct 18 13:22:29 2008 -0700 +++ b/tests/test-permissions Sat Oct 18 13:22:46 2008 -0700 @@ -23,3 +23,5 @@ hg status chmod -rx dir hg status +# reenable perm to allow deletion +chmod +rx dir