Mercurial > hg
comparison mercurial/merge.py @ 38757:d49e490a9e85 stable
merge: do the trivial resolution after updating sparse checkout
In merge, we do trivial resolution for files which were deleted on one side and
changed on other. When sparse extension in involved that file might not be
present in wdir and trivial resolution can lead to file not found error. This
patch make sure we updates the sparse checkout before doing the trivial
resolution.
This fixes the test failure demonstrated in previous patch.
Differential Revision: https://phab.mercurial-scm.org/D3984
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 27 Jul 2018 14:56:10 +0300 |
parents | be4984261611 |
children | 7fea205fd5dc |
comparison
equal
deleted
inserted
replaced
38756:91c405f84cf7 | 38757:d49e490a9e85 |
---|---|
1422 # These two could be merged as first move and then delete ... | 1422 # These two could be merged as first move and then delete ... |
1423 # but instead drop moving and just delete. | 1423 # but instead drop moving and just delete. |
1424 del actions[f] | 1424 del actions[f] |
1425 repo.ui.note(_('end of auction\n\n')) | 1425 repo.ui.note(_('end of auction\n\n')) |
1426 | 1426 |
1427 _resolvetrivial(repo, wctx, mctx, ancestors[0], actions) | |
1428 | |
1429 if wctx.rev() is None: | 1427 if wctx.rev() is None: |
1430 fractions = _forgetremoved(wctx, mctx, branchmerge) | 1428 fractions = _forgetremoved(wctx, mctx, branchmerge) |
1431 actions.update(fractions) | 1429 actions.update(fractions) |
1432 | 1430 |
1433 prunedactions = sparse.filterupdatesactions(repo, wctx, mctx, branchmerge, | 1431 prunedactions = sparse.filterupdatesactions(repo, wctx, mctx, branchmerge, |
1434 actions) | 1432 actions) |
1433 _resolvetrivial(repo, wctx, mctx, ancestors[0], actions) | |
1435 | 1434 |
1436 return prunedactions, diverge, renamedelete | 1435 return prunedactions, diverge, renamedelete |
1437 | 1436 |
1438 def _getcwd(): | 1437 def _getcwd(): |
1439 try: | 1438 try: |