Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.py @ 36095:59adb3051718
manifest: clean up dirlog() to take a d parameter to avoid shadowing dir()
Differential Revision: https://phab.mercurial-scm.org/D2187
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 12 Feb 2018 14:01:44 -0500 |
parents | fbf1a5d680ea |
children | b42c47b8c9d4 |
comparison
equal
deleted
inserted
replaced
36094:142ce66a4118 | 36095:59adb3051718 |
---|---|
1243 def clearcaches(self): | 1243 def clearcaches(self): |
1244 super(manifestrevlog, self).clearcaches() | 1244 super(manifestrevlog, self).clearcaches() |
1245 self._fulltextcache.clear() | 1245 self._fulltextcache.clear() |
1246 self._dirlogcache = {'': self} | 1246 self._dirlogcache = {'': self} |
1247 | 1247 |
1248 def dirlog(self, dir): | 1248 def dirlog(self, d): |
1249 if dir: | 1249 if d: |
1250 assert self._treeondisk | 1250 assert self._treeondisk |
1251 if dir not in self._dirlogcache: | 1251 if d not in self._dirlogcache: |
1252 mfrevlog = manifestrevlog(self.opener, dir, | 1252 mfrevlog = manifestrevlog(self.opener, d, |
1253 self._dirlogcache, | 1253 self._dirlogcache, |
1254 treemanifest=self._treeondisk) | 1254 treemanifest=self._treeondisk) |
1255 self._dirlogcache[dir] = mfrevlog | 1255 self._dirlogcache[d] = mfrevlog |
1256 return self._dirlogcache[dir] | 1256 return self._dirlogcache[d] |
1257 | 1257 |
1258 def add(self, m, transaction, link, p1, p2, added, removed, readtree=None): | 1258 def add(self, m, transaction, link, p1, p2, added, removed, readtree=None): |
1259 if (p1 in self.fulltextcache and util.safehasattr(m, 'fastdelta') | 1259 if (p1 in self.fulltextcache and util.safehasattr(m, 'fastdelta') |
1260 and not self._usemanifestv2): | 1260 and not self._usemanifestv2): |
1261 # If our first parent is in the manifest cache, we can | 1261 # If our first parent is in the manifest cache, we can |