##// END OF EJS Templates
manifest: clean up dirlog() to take a d parameter to avoid shadowing dir()...
Augie Fackler -
r36112:59adb305 default
parent child Browse files
Show More
@@ -116,12 +116,12 b' def makenarrowmanifestrevlog(mfrevlog, r'
116 # This function is called via debug{revlog,index,data}, but also during
116 # This function is called via debug{revlog,index,data}, but also during
117 # at least some push operations. This will be used to wrap/exclude the
117 # at least some push operations. This will be used to wrap/exclude the
118 # child directories when using treemanifests.
118 # child directories when using treemanifests.
119 def dirlog(self, dir):
119 def dirlog(self, d):
120 if dir and not dir.endswith('/'):
120 if d and not d.endswith('/'):
121 dir = dir + '/'
121 d = d + '/'
122 if not repo.narrowmatch().visitdir(dir[:-1] or '.'):
122 if not repo.narrowmatch().visitdir(d[:-1] or '.'):
123 return excludedmanifestrevlog(dir)
123 return excludedmanifestrevlog(d)
124 result = super(narrowmanifestrevlog, self).dirlog(dir)
124 result = super(narrowmanifestrevlog, self).dirlog(d)
125 makenarrowmanifestrevlog(result, repo)
125 makenarrowmanifestrevlog(result, repo)
126 return result
126 return result
127
127
@@ -1245,15 +1245,15 b' class manifestrevlog(revlog.revlog):'
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')
General Comments 0
You need to be logged in to leave comments. Login now