Mercurial > hg
comparison mercurial/dirstate.py @ 47987:dd267f16042f
dirstate: make a conditionnal easier to read in `setparents`
By grabing `nullid` in the local space, we get the conditionnal to fit in one
line.
Differential Revision: https://phab.mercurial-scm.org/D11427
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 15 Sep 2021 10:02:11 +0200 |
parents | 72b80a0124f8 |
children | d459c6b84961 |
comparison
equal
deleted
inserted
replaced
47986:72b80a0124f8 | 47987:dd267f16042f |
---|---|
385 oldp2 = self._pl[1] | 385 oldp2 = self._pl[1] |
386 if self._origpl is None: | 386 if self._origpl is None: |
387 self._origpl = self._pl | 387 self._origpl = self._pl |
388 self._map.setparents(p1, p2) | 388 self._map.setparents(p1, p2) |
389 copies = {} | 389 copies = {} |
390 if ( | 390 nullid = self._nodeconstants.nullid |
391 oldp2 != self._nodeconstants.nullid | 391 if oldp2 != nullid and p2 == nullid: |
392 and p2 == self._nodeconstants.nullid | |
393 ): | |
394 candidatefiles = self._map.non_normal_or_other_parent_paths() | 392 candidatefiles = self._map.non_normal_or_other_parent_paths() |
395 | 393 |
396 for f in candidatefiles: | 394 for f in candidatefiles: |
397 s = self._map.get(f) | 395 s = self._map.get(f) |
398 if s is None: | 396 if s is None: |