##// END OF EJS Templates
dirstate: use native strings when peeking in __dict__...
Augie Fackler -
r35853:bf367a93 default
parent child Browse files
Show More
@@ -360,7 +360,7 b' class dirstate(object):'
360 rereads the dirstate. Use localrepo.invalidatedirstate() if you want to
360 rereads the dirstate. Use localrepo.invalidatedirstate() if you want to
361 check whether the dirstate has changed before rereading it.'''
361 check whether the dirstate has changed before rereading it.'''
362
362
363 for a in ("_map", "_branch", "_ignore"):
363 for a in (r"_map", r"_branch", r"_ignore"):
364 if a in self.__dict__:
364 if a in self.__dict__:
365 delattr(self, a)
365 delattr(self, a)
366 self._lastnormaltime = 0
366 self._lastnormaltime = 0
@@ -1264,9 +1264,9 b' class dirstatemap(object):'
1264
1264
1265 def addfile(self, f, oldstate, state, mode, size, mtime):
1265 def addfile(self, f, oldstate, state, mode, size, mtime):
1266 """Add a tracked file to the dirstate."""
1266 """Add a tracked file to the dirstate."""
1267 if oldstate in "?r" and "_dirs" in self.__dict__:
1267 if oldstate in "?r" and r"_dirs" in self.__dict__:
1268 self._dirs.addpath(f)
1268 self._dirs.addpath(f)
1269 if oldstate == "?" and "_alldirs" in self.__dict__:
1269 if oldstate == "?" and r"_alldirs" in self.__dict__:
1270 self._alldirs.addpath(f)
1270 self._alldirs.addpath(f)
1271 self._map[f] = dirstatetuple(state, mode, size, mtime)
1271 self._map[f] = dirstatetuple(state, mode, size, mtime)
1272 if state != 'n' or mtime == -1:
1272 if state != 'n' or mtime == -1:
@@ -1282,11 +1282,11 b' class dirstatemap(object):'
1282 the file's previous state. In the future, we should refactor this
1282 the file's previous state. In the future, we should refactor this
1283 to be more explicit about what that state is.
1283 to be more explicit about what that state is.
1284 """
1284 """
1285 if oldstate not in "?r" and "_dirs" in self.__dict__:
1285 if oldstate not in "?r" and r"_dirs" in self.__dict__:
1286 self._dirs.delpath(f)
1286 self._dirs.delpath(f)
1287 if oldstate == "?" and "_alldirs" in self.__dict__:
1287 if oldstate == "?" and r"_alldirs" in self.__dict__:
1288 self._alldirs.addpath(f)
1288 self._alldirs.addpath(f)
1289 if "filefoldmap" in self.__dict__:
1289 if r"filefoldmap" in self.__dict__:
1290 normed = util.normcase(f)
1290 normed = util.normcase(f)
1291 self.filefoldmap.pop(normed, None)
1291 self.filefoldmap.pop(normed, None)
1292 self._map[f] = dirstatetuple('r', 0, size, 0)
1292 self._map[f] = dirstatetuple('r', 0, size, 0)
@@ -1299,11 +1299,11 b' class dirstatemap(object):'
1299 """
1299 """
1300 exists = self._map.pop(f, None) is not None
1300 exists = self._map.pop(f, None) is not None
1301 if exists:
1301 if exists:
1302 if oldstate != "r" and "_dirs" in self.__dict__:
1302 if oldstate != "r" and r"_dirs" in self.__dict__:
1303 self._dirs.delpath(f)
1303 self._dirs.delpath(f)
1304 if "_alldirs" in self.__dict__:
1304 if r"_alldirs" in self.__dict__:
1305 self._alldirs.delpath(f)
1305 self._alldirs.delpath(f)
1306 if "filefoldmap" in self.__dict__:
1306 if r"filefoldmap" in self.__dict__:
1307 normed = util.normcase(f)
1307 normed = util.normcase(f)
1308 self.filefoldmap.pop(normed, None)
1308 self.filefoldmap.pop(normed, None)
1309 self.nonnormalset.discard(f)
1309 self.nonnormalset.discard(f)
General Comments 0
You need to be logged in to leave comments. Login now