Mercurial > hg
comparison mercurial/dirstate.py @ 47985:7e65ca30fb91
dirstate: replace `_add` call in `setparent`
Same logic as the previous changeset, it get us closer to removed older API on
the dirstate.
Differential Revision: https://phab.mercurial-scm.org/D11425
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Sep 2021 18:18:16 +0200 |
parents | 6255a0d33c45 |
children | 72b80a0124f8 |
comparison
equal
deleted
inserted
replaced
47984:6255a0d33c45 | 47985:7e65ca30fb91 |
---|---|
407 # Also fix up otherparent markers | 407 # Also fix up otherparent markers |
408 elif s.from_p2: | 408 elif s.from_p2: |
409 source = self._map.copymap.get(f) | 409 source = self._map.copymap.get(f) |
410 if source: | 410 if source: |
411 copies[f] = source | 411 copies[f] = source |
412 self._add(f) | 412 self._check_new_tracked_filename(f) |
413 self._updatedfiles.add(f) | |
414 self._map.reset_state( | |
415 f, | |
416 p1_tracked=False, | |
417 wc_tracked=True, | |
418 ) | |
413 return copies | 419 return copies |
414 | 420 |
415 def setbranch(self, branch): | 421 def setbranch(self, branch): |
416 self.__class__._branch.set(self, encoding.fromlocal(branch)) | 422 self.__class__._branch.set(self, encoding.fromlocal(branch)) |
417 f = self._opener(b'branch', b'w', atomictemp=True, checkambig=True) | 423 f = self._opener(b'branch', b'w', atomictemp=True, checkambig=True) |