Mercurial > hg
comparison mercurial/dirstate.py @ 47527:c6b91a9c242a
dirstate: use a `merged` parameter to _addpath
Differential Revision: https://phab.mercurial-scm.org/D10969
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 01:48:11 +0200 |
parents | 8bcae9bf9e8d |
children | 80617f3c0f9a |
comparison
equal
deleted
inserted
replaced
47526:8bcae9bf9e8d | 47527:c6b91a9c242a |
---|---|
446 state=None, | 446 state=None, |
447 mode=0, | 447 mode=0, |
448 size=None, | 448 size=None, |
449 mtime=None, | 449 mtime=None, |
450 added=False, | 450 added=False, |
451 merged=False, | |
451 from_p2=False, | 452 from_p2=False, |
452 possibly_dirty=False, | 453 possibly_dirty=False, |
453 ): | 454 ): |
454 entry = self._map.get(f) | 455 entry = self._map.get(f) |
455 if added or entry is not None and entry.removed: | 456 if added or entry is not None and entry.removed: |
474 state=state, | 475 state=state, |
475 mode=mode, | 476 mode=mode, |
476 size=size, | 477 size=size, |
477 mtime=mtime, | 478 mtime=mtime, |
478 added=added, | 479 added=added, |
480 merged=merged, | |
479 from_p2=from_p2, | 481 from_p2=from_p2, |
480 possibly_dirty=possibly_dirty, | 482 possibly_dirty=possibly_dirty, |
481 ) | 483 ) |
482 | 484 |
483 def normal(self, f, parentfiledata=None): | 485 def normal(self, f, parentfiledata=None): |
536 if not self.in_merge: | 538 if not self.in_merge: |
537 msg = _(b"setting %r to other parent only allowed in merges") % f | 539 msg = _(b"setting %r to other parent only allowed in merges") % f |
538 raise error.Abort(msg) | 540 raise error.Abort(msg) |
539 if f in self and self[f] == b'n': | 541 if f in self and self[f] == b'n': |
540 # merge-like | 542 # merge-like |
541 self._addpath(f, b'm', 0, from_p2=True) | 543 self._addpath(f, merged=True) |
542 else: | 544 else: |
543 # add-like | 545 # add-like |
544 self._addpath(f, b'n', 0, from_p2=True) | 546 self._addpath(f, b'n', 0, from_p2=True) |
545 self._map.copymap.pop(f, None) | 547 self._map.copymap.pop(f, None) |
546 | 548 |