changeset 5321:639935f2e63a

Merge with crew-stable
author Patrick Mezard <pmezard@gmail.com>
date Sat, 22 Sep 2007 18:56:36 +0200
parents 189d82b6962e (current diff) 598dae804a5f (diff)
children 121816063b9a
files mercurial/statichttprepo.py
diffstat 3 files changed, 29 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/statichttprepo.py	Sat Sep 22 18:35:53 2007 +0200
+++ b/mercurial/statichttprepo.py	Sat Sep 22 18:56:36 2007 +0200
@@ -33,7 +33,7 @@
         self._url = path
         self.ui = ui
 
-        self.path = (path + "/.hg")
+        self.path = path.rstrip('/') + "/.hg"
         self.opener = opener(self.path)
         # find requirements
         try:
--- a/tests/test-static-http	Sat Sep 22 18:35:53 2007 +0200
+++ b/tests/test-static-http	Sat Sep 22 18:56:36 2007 +0200
@@ -49,4 +49,18 @@
 echo 'changegroup = python ../printenv.py changegroup' >> .hg/hgrc
 http_proxy= hg pull
 
+echo '% test with "/" URI (issue 747)'
+cd ..
+hg init
+echo a > a
+hg add a
+hg ci -ma
+
+http_proxy= hg clone static-http://localhost:20059/ local2
+
+cd local2
+hg verify
+cat a
+hg paths
+
 kill $!
--- a/tests/test-static-http.out	Sat Sep 22 18:35:53 2007 +0200
+++ b/tests/test-static-http.out	Sat Sep 22 18:56:36 2007 +0200
@@ -28,3 +28,17 @@
 adding file changes
 added 1 changesets with 1 changes to 1 files
 (run 'hg update' to get a working copy)
+% test with "/" URI (issue 747)
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 1 changes to 1 files
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+checking changesets
+checking manifests
+crosschecking files in changesets and manifests
+checking files
+1 files, 1 changesets, 1 total revisions
+a
+default = static-http://localhost:20059/