comparison mercurial/dirstate.py @ 4614:3a645af7fb76

localrepo and dirstate: rename reload to invalidate We want to avoid actually reloading if possible.
author Matt Mackall <mpm@selenic.com>
date Mon, 18 Jun 2007 13:24:34 -0500
parents 17ee7407097f
children a8be3c875988
comparison
equal deleted inserted replaced
4613:17ee7407097f 4614:3a645af7fb76
147 f, c = f.split('\0') 147 f, c = f.split('\0')
148 copymap[f] = c 148 copymap[f] = c
149 dmap[f] = e[:4] 149 dmap[f] = e[:4]
150 pos = newpos 150 pos = newpos
151 151
152 def reload(self): 152 def invalidate(self):
153 for a in "map copymap _branch pl dirs _ignore".split(): 153 for a in "map copymap _branch pl dirs _ignore".split():
154 if hasattr(self, a): 154 if hasattr(self, a):
155 self.__delattr__(a) 155 self.__delattr__(a)
156 156
157 def copy(self, source, dest): 157 def copy(self, source, dest):
226 except KeyError: 226 except KeyError:
227 self.ui.warn(_("not in dirstate: %s!\n") % f) 227 self.ui.warn(_("not in dirstate: %s!\n") % f)
228 pass 228 pass
229 229
230 def rebuild(self, parent, files): 230 def rebuild(self, parent, files):
231 self.reload() 231 self.invalidate()
232 for f in files: 232 for f in files:
233 if files.execf(f): 233 if files.execf(f):
234 self.map[f] = ('n', 0777, -1, 0) 234 self.map[f] = ('n', 0777, -1, 0)
235 else: 235 else:
236 self.map[f] = ('n', 0666, -1, 0) 236 self.map[f] = ('n', 0666, -1, 0)