changeset 37691:d241e6632669

lfs: fix the inferred remote store path when using a --prefix This wasn't appending the '.git/info/lfs' path in this case.
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 13 Apr 2018 14:16:30 -0400
parents 726c4102db9e
children 10e5bb9678f4
files hgext/lfs/blobstore.py tests/test-lfs-serve-access.t
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/lfs/blobstore.py	Fri Apr 13 12:39:54 2018 -0400
+++ b/hgext/lfs/blobstore.py	Fri Apr 13 14:16:30 2018 -0400
@@ -561,7 +561,7 @@
         if defaulturl.scheme in (b'http', b'https'):
             if defaulturl.path and defaulturl.path[:-1] != b'/':
                 defaulturl.path += b'/'
-            defaulturl.path = defaulturl.path or b'' + b'.git/info/lfs'
+            defaulturl.path = (defaulturl.path or b'') + b'.git/info/lfs'
 
             url = util.url(bytes(defaulturl))
             repo.ui.note(_('lfs: assuming remote store: %s\n') % url)
--- a/tests/test-lfs-serve-access.t	Fri Apr 13 12:39:54 2018 -0400
+++ b/tests/test-lfs-serve-access.t	Fri Apr 13 14:16:30 2018 -0400
@@ -73,8 +73,7 @@
   >    -A $TESTTMP/access.log -E $TESTTMP/errors.log
   $ cat hg.pid >> $DAEMON_PIDS
 
-  $ hg --config lfs.url=http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs \
-  >    clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2
+  $ hg clone --debug http://localhost:$HGPORT/subdir/mount/point cloned2
   using http://localhost:$HGPORT/subdir/mount/point
   sending capabilities command
   query 1; heads
@@ -104,6 +103,7 @@
   resolving manifests
    branchmerge: False, force: False, partial: False
    ancestor: 000000000000, local: 000000000000+, remote: 525251863cad
+  lfs: assuming remote store: http://localhost:$HGPORT/subdir/mount/point/.git/info/lfs
   Status: 200
   Content-Length: 371
   Content-Type: application/vnd.git-lfs+json