diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py +++ b/mercurial/statichttprepo.py @@ -74,6 +74,9 @@ class statichttprepository(localrepo.loc def local(self): return False + def lock(self, wait=True): + raise util.Abort(_('cannot lock static-http repository')) + def instance(ui, path, create): if create: raise util.Abort(_('cannot create new static-http repository')) diff --git a/tests/test-static-http b/tests/test-static-http --- a/tests/test-static-http +++ b/tests/test-static-http @@ -49,6 +49,12 @@ echo '[hooks]' >> .hg/hgrc echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc http_proxy= hg pull | sed -e 's,:[0-9][0-9]*/,/,' +echo '% trying to push' +hg update +echo more foo >> bar +hg commit -m"test" -d "100000000 0" +http_proxy= hg push | sed -e 's,:[0-9][0-9]*/,/,' + echo '% test with "/" URI (issue 747)' cd .. hg init diff --git a/tests/test-static-http.out b/tests/test-static-http.out --- a/tests/test-static-http.out +++ b/tests/test-static-http.out @@ -29,6 +29,10 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) +% trying to push +1 files updated, 0 files merged, 0 files removed, 0 files unresolved +abort: cannot lock static-http repository +pushing to static-http://localhost/remote % test with "/" URI (issue 747) requesting all changes adding changesets