comparison mercurial/sparse.py @ 33298:f41a99c45956

sparse: move profile reading into core One more step towards weaning off methods on repo instances and moving code to core. While this function is only used once and is simple, it needs to exist on its own so Facebook can monkeypatch it to enable simplecache integration.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 06 Jul 2017 12:14:12 -0700
parents ba5d89774db6
children 41448fc51510
comparison
equal deleted inserted replaced
33297:ba5d89774db6 33298:f41a99c45956
44 ' paths starting with /, ignoring %s\n') % line) 44 ' paths starting with /, ignoring %s\n') % line)
45 continue 45 continue
46 current.add(line) 46 current.add(line)
47 47
48 return includes, excludes, profiles 48 return includes, excludes, profiles
49
50 # Exists as separate function to facilitate monkeypatching.
51 def readprofile(repo, profile, changeid):
52 """Resolve the raw content of a sparse profile file."""
53 # TODO add some kind of cache here because this incurs a manifest
54 # resolve and can be slow.
55 return repo.filectx(profile, changeid=changeid).data()