do not pretend to lock static-http repositories (issue994)
authorMartin Geisler <mg@daimi.au.dk>
Mon, 08 Sep 2008 11:32:53 +0200
changeset 7005 7739b61897df
parent 7004 90227c42b5f6
child 7006 92d44ec32430
do not pretend to lock static-http repositories (issue994)
mercurial/statichttprepo.py
tests/test-static-http
tests/test-static-http.out
--- 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'))
--- 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
--- 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