Mercurial > hg
comparison mercurial/dirstate.py @ 47523:b76d54b90dc9
dirstate: stop using `oldstate` in `dirstate._addpath`
We don't need to pass the oldstate around, so lets use the new property
instead.
Differential Revision: https://phab.mercurial-scm.org/D10965
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 03 Jul 2021 20:57:44 +0200 |
parents | 587bb99ea311 |
children | 69a463a4f193 |
comparison
equal
deleted
inserted
replaced
47522:587bb99ea311 | 47523:b76d54b90dc9 |
---|---|
449 mtime=None, | 449 mtime=None, |
450 from_p2=False, | 450 from_p2=False, |
451 possibly_dirty=False, | 451 possibly_dirty=False, |
452 ): | 452 ): |
453 oldstate = self[f] | 453 oldstate = self[f] |
454 if state == b'a' or oldstate == b'r': | 454 entry = self._map.get(f) |
455 if state == b'a' or entry is not None and entry.removed: | |
455 scmutil.checkfilename(f) | 456 scmutil.checkfilename(f) |
456 if self._map.hastrackeddir(f): | 457 if self._map.hastrackeddir(f): |
457 msg = _(b'directory %r already in dirstate') | 458 msg = _(b'directory %r already in dirstate') |
458 msg %= pycompat.bytestr(f) | 459 msg %= pycompat.bytestr(f) |
459 raise error.Abort(msg) | 460 raise error.Abort(msg) |