Patchwork [3,of,4,V2] lfs: infer the blob store URL from an explicit pull source

login
register
mail settings
Submitter Yuya Nishihara
Date April 11, 2018, 11:54 a.m.
Message ID <20180411205409.0ca9cd2fd5c633e0416a5fe2@tcha.org>
Download mbox | patch
Permalink /patch/30680/
State New
Headers show

Comments

Yuya Nishihara - April 11, 2018, 11:54 a.m.
On Tue, 10 Apr 2018 16:09:25 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1523165019 14400
> #      Sun Apr 08 01:23:39 2018 -0400
> # Node ID b0ae606b4a10738c97d791ac6867cd100eb2ea9d
> # Parent  b784de3b414876f25964778b02e684f9b0a3787f
> lfs: infer the blob store URL from an explicit pull source

> diff --git a/tests/test-lfs-serve.t b/tests/test-lfs-serve.t
> --- a/tests/test-lfs-serve.t
> +++ b/tests/test-lfs-serve.t
> @@ -252,7 +252,26 @@ lfs content, and the extension enabled.
>    $TESTTMP/server/.hg/requires:lfs
>  
>    $ hg init $TESTTMP/client6_pull
> -  $ hg -R $TESTTMP/client6_pull pull -q http://localhost:$HGPORT
> +  $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT
> +  pulling from http://localhost:$HGPORT/
> +  requesting all changes
> +  adding changesets
> +  adding manifests
> +  adding file changes
> +  added 6 changesets with 5 changes to 5 files (+1 heads)
> +  calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
> +  new changesets d437e1d24fbd:d3b84d50eacb
> +  resolving manifests
> +  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
> +  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
> +  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
> +  getting lfs2.txt
> +  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
> +  getting nonlfs2.txt
> +  getting nonlfs3.txt
> +  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  updated to "d3b84d50eacb: lfs file with lfs client"
> +  1 other heads for branch "default"

This test fails. Can you take a look? I've queued the first two.


ERROR: test-lfs-serve.t (case lfsremote-on) output changed
!
Failed test-lfs-serve.t (case lfsremote-on): output changed
# Ran 2 tests, 0 skipped, 1 failed.
python hash seed: 499131711
Matt Harbison - April 11, 2018, 3:51 p.m.
> On Apr 11, 2018, at 7:54 AM, Yuya Nishihara <yuya@tcha.org> wrote:
> 
>> On Tue, 10 Apr 2018 16:09:25 -0400, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison@yahoo.com>
>> # Date 1523165019 14400
>> #      Sun Apr 08 01:23:39 2018 -0400
>> # Node ID b0ae606b4a10738c97d791ac6867cd100eb2ea9d
>> # Parent  b784de3b414876f25964778b02e684f9b0a3787f
>> lfs: infer the blob store URL from an explicit pull source
> 
>> diff --git a/tests/test-lfs-serve.t b/tests/test-lfs-serve.t
>> --- a/tests/test-lfs-serve.t
>> +++ b/tests/test-lfs-serve.t
>> @@ -252,7 +252,26 @@ lfs content, and the extension enabled.
>>   $TESTTMP/server/.hg/requires:lfs
>> 
>>   $ hg init $TESTTMP/client6_pull
>> -  $ hg -R $TESTTMP/client6_pull pull -q http://localhost:$HGPORT
>> +  $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT
>> +  pulling from http://localhost:$HGPORT/
>> +  requesting all changes
>> +  adding changesets
>> +  adding manifests
>> +  adding file changes
>> +  added 6 changesets with 5 changes to 5 files (+1 heads)
>> +  calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
>> +  new changesets d437e1d24fbd:d3b84d50eacb
>> +  resolving manifests
>> +  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
>> +  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
>> +  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
>> +  getting lfs2.txt
>> +  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
>> +  getting nonlfs2.txt
>> +  getting nonlfs3.txt
>> +  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
>> +  updated to "d3b84d50eacb: lfs file with lfs client"
>> +  1 other heads for branch "default"
> 
> This test fails. Can you take a look? I've queued the first two.

For some reason, the usercache url is being turned into "/tmp/.../null://", but only on Unix.  That means it’s not being disabled.  The lfutil function is calling ui.configpath(), which is doing the mangling.

What’s better, handling the null:// substring specially to be consistent with the store syntax, or a configbool?

Patch

--- tests/test-lfs-serve.t
+++ tests/test-lfs-serve.t.lfsremote-on.err
@@ -262,11 +262,8 @@ 
   calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
   new changesets d437e1d24fbd:d3b84d50eacb
   resolving manifests
-  lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
-  lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
-  lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
   getting lfs2.txt
-  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
+  lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the usercache
   getting nonlfs2.txt
   getting nonlfs3.txt
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved