largefiles: allow use of urls with #revision stable
authorMads Kiilerich <madski@unity3d.com>
Mon, 28 Jan 2013 15:19:44 +0100
branchstable
changeset 18489 f1700480bef7
parent 18488 a977b42df8b3
child 18490 877f80599df0
largefiles: allow use of urls with #revision largefiles tried to create a peer directly with the specified url. That caused abort: unsupported URL component: "..." if a revision was specified in the url. The branch name do not matter for largefiles' use of remote peers. Largefiles will be shared among all branches anyway.
hgext/largefiles/basestore.py
tests/test-largefiles.t
--- a/hgext/largefiles/basestore.py	Mon Jan 28 15:19:44 2013 +0100
+++ b/hgext/largefiles/basestore.py	Mon Jan 28 15:19:44 2013 +0100
@@ -165,6 +165,7 @@
             path = ''
             remote = repo
         else:
+            path, _branches = hg.parseurl(path)
             remote = hg.peer(repo, {}, path)
 
     # The path could be a scheme so use Mercurial's normal functionality
--- a/tests/test-largefiles.t	Mon Jan 28 15:19:44 2013 +0100
+++ b/tests/test-largefiles.t	Mon Jan 28 15:19:44 2013 +0100
@@ -1619,7 +1619,7 @@
   >   --config 'web.allow_push=*' --config web.push_ssl=False
   $ cat hg.pid >> $DAEMON_PIDS
   $ rm "${USERCACHE}"/*
-  $ hg push -R r8 http://localhost:$HGPORT2
+  $ hg push -R r8 http://localhost:$HGPORT2/#default
   pushing to http://localhost:$HGPORT2/
   searching for changes
   searching for changes
@@ -1632,8 +1632,7 @@
 
 Clone over http, no largefiles pulled on clone.
 
-  $ hg clone http://localhost:$HGPORT2/ http-clone -U
-  requesting all changes
+  $ hg clone http://localhost:$HGPORT2/#default http-clone -U
   adding changesets
   adding manifests
   adding file changes