# HG changeset patch # User Martin Geisler # Date 1220866373 -7200 # Node ID 7739b61897df08249f435538a45bce3645e11198 # Parent 90227c42b5f64f1271946dd8ca7846e591bab492 do not pretend to lock static-http repositories (issue994) diff -r 90227c42b5f6 -r 7739b61897df mercurial/statichttprepo.py --- a/mercurial/statichttprepo.py Mon Sep 08 00:50:34 2008 +0200 +++ b/mercurial/statichttprepo.py Mon Sep 08 11:32:53 2008 +0200 @@ -74,6 +74,9 @@ 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 -r 90227c42b5f6 -r 7739b61897df tests/test-static-http --- a/tests/test-static-http Mon Sep 08 00:50:34 2008 +0200 +++ b/tests/test-static-http Mon Sep 08 11:32:53 2008 +0200 @@ -49,6 +49,12 @@ 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 -r 90227c42b5f6 -r 7739b61897df tests/test-static-http.out --- a/tests/test-static-http.out Mon Sep 08 00:50:34 2008 +0200 +++ b/tests/test-static-http.out Mon Sep 08 11:32:53 2008 +0200 @@ -29,6 +29,10 @@ 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