##// END OF EJS Templates
httppeer: fix static-http: scheme autodetection (issue6833)...
av6 -
r51883:758e40b9 stable
parent child Browse files
Show More
@@ -663,7 +663,8 b' def make_peer('
663 return inst
663 return inst
664 except error.RepoError as httpexception:
664 except error.RepoError as httpexception:
665 try:
665 try:
666 r = statichttprepo.make_peer(ui, b"static-" + path.loc, create)
666 path = path.copy(new_raw_location=b"static-" + path.rawloc)
667 r = statichttprepo.make_peer(ui, path, create)
667 ui.note(_(b'(falling back to static-http)\n'))
668 ui.note(_(b'(falling back to static-http)\n'))
668 return r
669 return r
669 except error.RepoError:
670 except error.RepoError:
@@ -148,9 +148,17 b' test with empty repo (issue965)'
148 $ hg paths
148 $ hg paths
149 default = static-http://localhost:$HGPORT/remotempty
149 default = static-http://localhost:$HGPORT/remotempty
150
150
151 test autodetecting static-http: scheme (issue6833)
152
153 $ cd ..
154 $ hg init actually-static
155 $ hg clone http://localhost:$HGPORT/actually-static local4
156 no changes found
157 updating to branch default
158 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
159
151 test with non-repo
160 test with non-repo
152
161
153 $ cd ..
154 $ mkdir notarepo
162 $ mkdir notarepo
155 $ hg clone static-http://localhost:$HGPORT/notarepo local3
163 $ hg clone static-http://localhost:$HGPORT/notarepo local3
156 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository
164 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository
@@ -225,6 +233,15 b' List of files accessed over HTTP:'
225 /.hg/store/data/~2ehgsub.i (py37 !)
233 /.hg/store/data/~2ehgsub.i (py37 !)
226 /.hg/store/data/~2ehgsubstate.i (py37 !)
234 /.hg/store/data/~2ehgsubstate.i (py37 !)
227 /.hg/store/requires
235 /.hg/store/requires
236 /actually-static/.hg/bookmarks
237 /actually-static/.hg/bookmarks.current
238 /actually-static/.hg/dirstate
239 /actually-static/.hg/requires
240 /actually-static/.hg/store/00changelog.i
241 /actually-static/.hg/store/00manifest.i
242 /actually-static/.hg/store/requires
243 /actually-static/?cmd=capabilities
244 /actually-static?cmd=capabilities
228 /notarepo/.hg/00changelog.i
245 /notarepo/.hg/00changelog.i
229 /notarepo/.hg/requires
246 /notarepo/.hg/requires
230 /remote-with-names/.hg/bookmarks
247 /remote-with-names/.hg/bookmarks
General Comments 0
You need to be logged in to leave comments. Login now