diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -1023,6 +1023,13 @@ (None, f, f, False, pa.node()), b'prompt deleted/changed', ) + else: + mresult.addfile( + f, + mergestatemod.ACTION_KEEP_ABSENT, + None, + b'local not present, remote unchanged', + ) if repo.ui.configbool(b'experimental', b'merge.checkpathconflicts'): # If we are merging, look for path conflicts. diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t --- a/tests/test-merge-criss-cross.t +++ b/tests/test-merge-criss-cross.t @@ -547,28 +547,26 @@ $ hg update --clean 'desc("merge-deleting-the-file-from-deleted")' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge 'desc("merge-keeping-the-file-from-deleted")' - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ ls -1 other-file - the-file (merging a deletion with keeping → conflict) BROKEN: this should result in conflict $ hg update --clean 'desc("merge-deleting-the-file-from-deleted")' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge 'desc("merge-keeping-the-file-from-updated")' - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ ls -1 other-file - the-file (merging two deletion together → no conflict) $ hg update --clean 'desc("merge-deleting-the-file-from-updated")' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge 'desc("merge-deleting-the-file-from-deleted")' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) @@ -581,23 +579,21 @@ $ hg update --clean 'desc("merge-deleting-the-file-from-updated")' 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge 'desc("merge-keeping-the-file-from-deleted")' - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ ls -1 other-file - the-file (merging a deletion with keeping → conflict) BROKEN: this should result in conflict $ hg update --clean 'desc("merge-deleting-the-file-from-updated")' - 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg merge 'desc("merge-keeping-the-file-from-updated")' - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ ls -1 other-file - the-file (merging two "keeping" together → no conflict)