Mercurial > hg
comparison mercurial/dirstate.py @ 47530:a1745a292885
dirstate: drop `state` to `_addpath`
All its value are inferred within the dirstatemap now.
Differential Revision: https://phab.mercurial-scm.org/D10972
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 01:59:41 +0200 |
parents | d3cf20328abd |
children | f5b8f0b9c129 |
comparison
equal
deleted
inserted
replaced
47529:d3cf20328abd | 47530:a1745a292885 |
---|---|
441 return self._map.copymap | 441 return self._map.copymap |
442 | 442 |
443 def _addpath( | 443 def _addpath( |
444 self, | 444 self, |
445 f, | 445 f, |
446 state=None, | |
447 mode=0, | 446 mode=0, |
448 size=None, | 447 size=None, |
449 mtime=None, | 448 mtime=None, |
450 added=False, | 449 added=False, |
451 merged=False, | 450 merged=False, |
470 raise error.Abort(msg) | 469 raise error.Abort(msg) |
471 self._dirty = True | 470 self._dirty = True |
472 self._updatedfiles.add(f) | 471 self._updatedfiles.add(f) |
473 self._map.addfile( | 472 self._map.addfile( |
474 f, | 473 f, |
475 state=state, | |
476 mode=mode, | 474 mode=mode, |
477 size=size, | 475 size=size, |
478 mtime=mtime, | 476 mtime=mtime, |
479 added=added, | 477 added=added, |
480 merged=merged, | 478 merged=merged, |
497 else: | 495 else: |
498 s = os.lstat(self._join(f)) | 496 s = os.lstat(self._join(f)) |
499 mode = s.st_mode | 497 mode = s.st_mode |
500 size = s.st_size | 498 size = s.st_size |
501 mtime = s[stat.ST_MTIME] | 499 mtime = s[stat.ST_MTIME] |
502 self._addpath(f, b'n', mode, size, mtime) | 500 self._addpath(f, mode=mode, size=size, mtime=mtime) |
503 self._map.copymap.pop(f, None) | 501 self._map.copymap.pop(f, None) |
504 if f in self._map.nonnormalset: | 502 if f in self._map.nonnormalset: |
505 self._map.nonnormalset.remove(f) | 503 self._map.nonnormalset.remove(f) |
506 if mtime > self._lastnormaltime: | 504 if mtime > self._lastnormaltime: |
507 # Remember the most recent modification timeslot for status(), | 505 # Remember the most recent modification timeslot for status(), |