[PATCH remotefilelog-ext] fileserverclient: add option to provide file path to cacheprocess
Augie Fackler
raf at durin42.com
Tue Jan 19 15:48:12 UTC 2016
# 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(
+ "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
More information about the Mercurial-devel
mailing list