Mercurial > hg
comparison mercurial/dirstate.py @ 47535:6025353c9c55
dirstate: no longer pass `oldstate` to the `dropfile`
The `oldstate` value come literally from `_map` so we don't need to pass tha
information along.
Differential Revision: https://phab.mercurial-scm.org/D10978
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 02:28:08 +0200 |
parents | e53a42dce923 |
children | 8e4b9fe31334 |
comparison
equal
deleted
inserted
replaced
47534:e53a42dce923 | 47535:6025353c9c55 |
---|---|
561 return self.normallookup(f) | 561 return self.normallookup(f) |
562 return self.otherparent(f) | 562 return self.otherparent(f) |
563 | 563 |
564 def drop(self, f): | 564 def drop(self, f): |
565 '''Drop a file from the dirstate''' | 565 '''Drop a file from the dirstate''' |
566 oldstate = self[f] | 566 if self._map.dropfile(f): |
567 if self._map.dropfile(f, oldstate): | |
568 self._dirty = True | 567 self._dirty = True |
569 self._updatedfiles.add(f) | 568 self._updatedfiles.add(f) |
570 self._map.copymap.pop(f, None) | 569 self._map.copymap.pop(f, None) |
571 | 570 |
572 def _discoverpath(self, path, normed, ignoremissing, exists, storemap): | 571 def _discoverpath(self, path, normed, ignoremissing, exists, storemap): |
1306 # opcode has fast paths when the value to be unpacked is a tuple or | 1305 # opcode has fast paths when the value to be unpacked is a tuple or |
1307 # a list, but falls back to creating a full-fledged iterator in | 1306 # a list, but falls back to creating a full-fledged iterator in |
1308 # general. That is much slower than simply accessing and storing the | 1307 # general. That is much slower than simply accessing and storing the |
1309 # tuple members one by one. | 1308 # tuple members one by one. |
1310 t = dget(fn) | 1309 t = dget(fn) |
1311 state = t.state | |
1312 mode = t[1] | 1310 mode = t[1] |
1313 size = t[2] | 1311 size = t[2] |
1314 time = t[3] | 1312 time = t[3] |
1315 | 1313 |
1316 if not st and t.tracked: | 1314 if not st and t.tracked: |