From patchwork Tue Jan 19 15:48:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [remotefilelog-ext] fileserverclient: add option to provide file path to cacheprocess From: Augie Fackler X-Patchwork-Id: 12831 Message-Id: To: Durham Goode Cc: mercurial-devel@selenic.com Date: Tue, 19 Jan 2016 10:48:12 -0500 # HG changeset patch # User Augie Fackler # 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