[Updated] [+- ] D8940: merge: store ACTION_KEEP when we are keeping the file deleted locally
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Aug 27 09:38:28 UTC 2020
pulkit updated this revision to Diff 22473.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8940?vs=22431&id=22473
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8940/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8940
AFFECTED FILES
mercurial/merge.py
tests/test-merge-criss-cross.t
CHANGE DETAILS
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)
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1019,6 +1019,13 @@
(None, f, f, False, pa.node()),
b'prompt deleted/changed',
)
+ else:
+ mresult.addfile(
+ f,
+ mergestatemod.ACTION_KEEP,
+ None,
+ 'local deleted, remote unchanged',
+ )
if repo.ui.configbool(b'experimental', b'merge.checkpathconflicts'):
# If we are merging, look for path conflicts.
To: pulkit, #hg-reviewers
Cc: marmoute, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200827/126eb356/attachment-0002.html>
More information about the Mercurial-patches
mailing list