##// END OF EJS Templates
context: replace repeated "self._repo.dirstate" by "ds" variable...
Martin von Zweigbergk -
r41763:fbd4ce55 default
parent child Browse files
Show More
@@ -1355,13 +1355,13 b' class workingctx(committablectx):'
1355 uipath = lambda f: ds.pathto(pathutil.join(prefix, f))
1355 uipath = lambda f: ds.pathto(pathutil.join(prefix, f))
1356 rejected = []
1356 rejected = []
1357 for f in files:
1357 for f in files:
1358 if f not in self._repo.dirstate:
1358 if f not in ds:
1359 self._repo.ui.warn(_("%s not tracked!\n") % uipath(f))
1359 self._repo.ui.warn(_("%s not tracked!\n") % uipath(f))
1360 rejected.append(f)
1360 rejected.append(f)
1361 elif self._repo.dirstate[f] != 'a':
1361 elif ds[f] != 'a':
1362 self._repo.dirstate.remove(f)
1362 ds.remove(f)
1363 else:
1363 else:
1364 self._repo.dirstate.drop(f)
1364 ds.drop(f)
1365 return rejected
1365 return rejected
1366
1366
1367 def copy(self, source, dest):
1367 def copy(self, source, dest):
@@ -1379,11 +1379,12 b' class workingctx(committablectx):'
1379 % self._repo.dirstate.pathto(dest))
1379 % self._repo.dirstate.pathto(dest))
1380 else:
1380 else:
1381 with self._repo.wlock():
1381 with self._repo.wlock():
1382 if self._repo.dirstate[dest] in '?':
1382 ds = self._repo.dirstate
1383 self._repo.dirstate.add(dest)
1383 if ds[dest] in '?':
1384 elif self._repo.dirstate[dest] in 'r':
1384 ds.add(dest)
1385 self._repo.dirstate.normallookup(dest)
1385 elif ds[dest] in 'r':
1386 self._repo.dirstate.copy(source, dest)
1386 ds.normallookup(dest)
1387 ds.copy(source, dest)
1387
1388
1388 def match(self, pats=None, include=None, exclude=None, default='glob',
1389 def match(self, pats=None, include=None, exclude=None, default='glob',
1389 listsubrepos=False, badfn=None):
1390 listsubrepos=False, badfn=None):
General Comments 0
You need to be logged in to leave comments. Login now