Mercurial > hg
comparison mercurial/merge.py @ 48746:18e69f224e4b
narrow: add support for merging add and remove outside of the tracked set
This extend f1eb77dceb36 to test and support the remaining action. Or, at least,
the simple incarnation of them.
Differential Revision: https://phab.mercurial-scm.org/D12181
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 03 Feb 2022 18:14:25 +0100 |
parents | f1eb77dceb36 |
children | af9f2c64302e |
comparison
equal
deleted
inserted
replaced
48745:94e36b230990 | 48746:18e69f224e4b |
---|---|
517 elif not branchmerge: | 517 elif not branchmerge: |
518 mresult.removefile(f) # just updating, ignore changes outside clone | 518 mresult.removefile(f) # just updating, ignore changes outside clone |
519 elif action[0].no_op: | 519 elif action[0].no_op: |
520 mresult.removefile(f) # merge does not affect file | 520 mresult.removefile(f) # merge does not affect file |
521 elif action[0].narrow_safe: | 521 elif action[0].narrow_safe: |
522 if ( | 522 if not f.endswith(b'/'): |
523 not f.endswith(b'/') | |
524 and action[0].changes == mergestatemod.CHANGE_MODIFIED | |
525 ): | |
526 mresult.removefile(f) # merge won't affect on-disk files | 523 mresult.removefile(f) # merge won't affect on-disk files |
527 | 524 |
528 mresult.addcommitinfo( | 525 mresult.addcommitinfo( |
529 f, b'outside-narrow-merge-action', action[0].changes | 526 f, b'outside-narrow-merge-action', action[0].changes |
530 ) | 527 ) |