[PATCH 04 of 13 sparse] sparse: remove reference to simplecache
Gregory Szorc
gregory.szorc at gmail.com
Sat Jul 1 21:55:21 EDT 2017
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1498932351 25200
# Sat Jul 01 11:05:51 2017 -0700
# Node ID f2b0d199751ba38008bc1862b95b8f6ecbb0d7be
# Parent 3c260103478c787f8c3e0915575fb94ebee5b89d
sparse: remove reference to simplecache
This is a 3rd party extension authored by Facebook. References in
core are not appropriate.
It will be possible to restore this code/optimization via
monkeypatching. So Facebook won't lose any functionality.
diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -436,16 +436,7 @@ def _wraprepo(ui, repo):
return includes, excludes, profiles
def getrawprofile(self, profile, changeid):
- try:
- simplecache = extensions.find('simplecache')
- node = self[changeid].hex()
- def func():
- return self.filectx(profile, changeid=changeid).data()
- key = 'sparseprofile:%s:%s' % (profile.replace('/', '__'), node)
- return simplecache.memoize(func, key,
- simplecache.stringserializer, self.ui)
- except KeyError:
- return self.filectx(profile, changeid=changeid).data()
+ return self.filectx(profile, changeid=changeid).data()
def sparsechecksum(self, filepath):
fh = open(filepath)
More information about the Mercurial-devel
mailing list