[PATCH remotefilelog-ext] fileserverclient: add option to provide file path to cacheprocess

Augie Fackler raf at durin42.com
Tue Jan 19 17:51:27 CST 2016


On Jan 19, 2016 18:50, "Durham Goode" <durham at fb.com> wrote:
>
> On 1/19/16 7:48 AM, Augie Fackler wrote:
>>
>> # HG changeset patch
>> # User Augie Fackler <augie at google.com>
>> # Date 1453218309 18000
>> #      Tue Jan 19 10:45:09 2016 -0500
>> # Node ID acf7a6bb3ce489c12065b171e4e7f44f49ce37b7
>> # Parent  b57b617d85adb373dc5c7b22e9fa750430163632
>> fileserverclient: add option to provide file path to cacheprocess
>>
>> For our uses of remotefilelog, life is significantly easier if we also
>> have the file path rather than just a hash of the file path. Hide this
>> behind a config knob so users can enable it or not as makes sense.
>>
>> diff --git a/remotefilelog/fileserverclient.py
b/remotefilelog/fileserverclient.py
>> --- a/remotefilelog/fileserverclient.py
>> +++ b/remotefilelog/fileserverclient.py
>> @@ -166,6 +166,8 @@ class fileserverclient(object):
>>           self.cacheprocess = ui.config("remotefilelog", "cacheprocess")
>>           if self.cacheprocess:
>>               self.cacheprocess = util.expandpath(self.cacheprocess)
>> +        self.cacheprocesspath = ui.configbool(
>
> I don't really like calling it 'cacheprocesspath', since it's not the
path to the cache process (which is what self.cacheprocess is). Mind if I
change it inflight?  I'll leave the ui facing option name alone.

By all means. I had no good name so I just picked something. Thanks!

>
>> +            "remotefilelog", "cacheprocess.includepath")
>>           self.debugoutput = ui.configbool("remotefilelog", "debug")
>>             self.localcache = localcache(repo)
>> @@ -204,6 +206,8 @@ class fileserverclient(object):
>>           reponame = repo.name
>>           for file, id in fileids:
>>               fullid = getcachekey(reponame, file, id)
>> +            if self.cacheprocesspath:
>> +                request += file + '\0'
>>               request += fullid + "\n"
>>               idmap[fullid] = file
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20160119/b9a46172/attachment.html>


More information about the Mercurial-devel mailing list