D12021: merge: set custom conflict label for base commit
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Jan 21 23:37:11 UTC 2022
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12021
AFFECTED FILES
mercurial/commands.py
tests/test-annotate.t
tests/test-conflict.t
tests/test-fastannotate-hg.t
tests/test-merge-changedelete.t
tests/test-merge-force.t
tests/test-merge-tools.t
tests/test-sparse.t
CHANGE DETAILS
diff --git a/tests/test-sparse.t b/tests/test-sparse.t
--- a/tests/test-sparse.t
+++ b/tests/test-sparse.t
@@ -211,11 +211,11 @@
hide
$ cat hide
- <<<<<<< dest: 39278f7c08a9 - test: two
+ <<<<<<< dest: 39278f7c08a9 - test: two
y
=======
z
- >>>>>>> source: b91df4f39e75 - test: edit hide
+ >>>>>>> source: b91df4f39e75 - test: edit hide
Verify aborting a rebase cleans up temporary files
diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t
--- a/tests/test-merge-tools.t
+++ b/tests/test-merge-tools.t
@@ -1223,15 +1223,15 @@
# hg update -C 1
$ hg merge -r 4 --config merge-tools.true.premerge=keep-merge3
merging f
- <<<<<<< working copy: ef83787e2614 - test: revision 1
+ <<<<<<< working copy: ef83787e2614 - test: revision 1
revision 1
space
- ||||||| base: ffd2bda21d6e - test: revision 0
+ ||||||| common ancestor: ffd2bda21d6e - test: revision 0
revision 0
space
=======
revision 4
- >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
+ >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
revision 0
space
revision 4
@@ -1239,15 +1239,15 @@
(branch merge, don't forget to commit)
$ aftermerge
# cat f
- <<<<<<< working copy: ef83787e2614 - test: revision 1
+ <<<<<<< working copy: ef83787e2614 - test: revision 1
revision 1
space
- ||||||| base: ffd2bda21d6e - test: revision 0
+ ||||||| common ancestor: ffd2bda21d6e - test: revision 0
revision 0
space
=======
revision 4
- >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
+ >>>>>>> merge rev: 81448d39c9a0 - test: revision 4
# hg stat
M f
# hg resolve --list
@@ -1264,12 +1264,12 @@
$ hg merge -r 4 --config merge-tools.true.premerge=keep-mergediff
merging f
<<<<<<<
- ------- base: ffd2bda21d6e - test: revision 0
- +++++++ working copy: ef83787e2614 - test: revision 1
+ ------- common ancestor: ffd2bda21d6e - test: revision 0
+ +++++++ working copy: ef83787e2614 - test: revision 1
-revision 0
+revision 1
space
- ======= merge rev: 81448d39c9a0 - test: revision 4
+ ======= merge rev: 81448d39c9a0 - test: revision 4
revision 4
>>>>>>>
revision 0
@@ -1280,12 +1280,12 @@
$ aftermerge
# cat f
<<<<<<<
- ------- base: ffd2bda21d6e - test: revision 0
- +++++++ working copy: ef83787e2614 - test: revision 1
+ ------- common ancestor: ffd2bda21d6e - test: revision 0
+ +++++++ working copy: ef83787e2614 - test: revision 1
-revision 0
+revision 1
space
- ======= merge rev: 81448d39c9a0 - test: revision 4
+ ======= merge rev: 81448d39c9a0 - test: revision 4
revision 4
>>>>>>>
# hg stat
@@ -1592,7 +1592,7 @@
arg: "ll:working copy"
arg: "lo:"
arg: "merge rev"
- arg: "lb:base: */f~base.*" (glob)
+ arg: "lb:common ancestor: */f~base.*" (glob)
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ rm -f 'printargs_merge_tool'
@@ -1619,7 +1619,7 @@
arg: "ll:working copy"
arg: "lo:"
arg: "merge rev"
- arg: "lb:base: */hgmerge.*/f~base" (glob)
+ arg: "lb:common ancestor: */hgmerge.*/f~base" (glob)
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ rm -f 'printargs_merge_tool'
@@ -1649,7 +1649,7 @@
arg: "ll:working copy: tooltmpl ef83787e2614"
arg: "lo:"
arg: "merge rev: tooltmpl 0185f4e0cf02"
- arg: "lb:base: */f~base.*" (glob)
+ arg: "lb:common ancestor: */f~base.*" (glob)
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ rm -f 'printargs_merge_tool'
@@ -2015,7 +2015,7 @@
Running merge tool for b ("*/bin/echo.exe"): (glob) (windows !)
Running merge tool for b (*/bin/echo): (glob) (no-windows !)
- local (working copy): 10:2d1f533d add binary file (#2) tip default
- - base (base): -1:00000000 default
+ - base (common ancestor): -1:00000000 default
- other (merge rev): 9:1e7ad7d7 add binary file (#1) default
merge runs here ...
0 files updated, 1 files merged, 0 files removed, 0 files unresolved
diff --git a/tests/test-merge-force.t b/tests/test-merge-force.t
--- a/tests/test-merge-force.t
+++ b/tests/test-merge-force.t
@@ -398,13 +398,13 @@
content2
M content1_content2_content1_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 8ef80617fa20 - test: base
+ ||||||| common ancestor: 8ef80617fa20 - test: base
content1
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M content1_content2_content1_content4-untracked
content2
@@ -428,13 +428,13 @@
content2
M content1_content2_content2_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 8ef80617fa20 - test: base
+ ||||||| common ancestor: 8ef80617fa20 - test: base
content1
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M content1_content2_content2_content4-untracked
content2
@@ -458,25 +458,25 @@
content2
M content1_content2_content3_content3-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content3
- ||||||| base: 8ef80617fa20 - test: base
+ ||||||| common ancestor: 8ef80617fa20 - test: base
content1
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M content1_content2_content3_content3-untracked
content2
M content1_content2_content3_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 8ef80617fa20 - test: base
+ ||||||| common ancestor: 8ef80617fa20 - test: base
content1
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M content1_content2_content3_content4-untracked
content2
@@ -500,13 +500,13 @@
content2
M content1_content2_missing_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 8ef80617fa20 - test: base
+ ||||||| common ancestor: 8ef80617fa20 - test: base
content1
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M content1_content2_missing_content4-untracked
content2
@@ -584,12 +584,12 @@
content2
M missing_content2_content2_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 000000000000 - :
+ ||||||| common ancestor: 000000000000 - :
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M missing_content2_content2_content4-untracked
content2
@@ -607,23 +607,23 @@
content2
M missing_content2_content3_content3-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content3
- ||||||| base: 000000000000 - :
+ ||||||| common ancestor: 000000000000 - :
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M missing_content2_content3_content3-untracked
content2
M missing_content2_content3_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 000000000000 - :
+ ||||||| common ancestor: 000000000000 - :
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M missing_content2_content3_content4-untracked
content2
@@ -641,20 +641,20 @@
content2
M missing_content2_missing_content4-tracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 000000000000 - :
+ ||||||| common ancestor: 000000000000 - :
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M missing_content2_missing_content4-untracked
- <<<<<<< working copy: 0447570f1af6 - test: local
+ <<<<<<< working copy: 0447570f1af6 - test: local
content4
- ||||||| base: 000000000000 - :
+ ||||||| common ancestor: 000000000000 - :
=======
content2
- >>>>>>> merge rev: 85100b8c675b - test: remote
+ >>>>>>> merge rev: 85100b8c675b - test: remote
M missing_content2_missing_missing-tracked
content2
diff --git a/tests/test-merge-changedelete.t b/tests/test-merge-changedelete.t
--- a/tests/test-merge-changedelete.t
+++ b/tests/test-merge-changedelete.t
@@ -680,12 +680,12 @@
changed
--- file3 ---
3
- <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, chan...
+ <<<<<<< working copy: 13910f48cf7b - test: changed file1, removed file2, c...
changed2
- ||||||| base: ab57bf49aa27 - test: added files
+ ||||||| common ancestor: ab57bf49aa27 - test: added files
=======
changed1
- >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, chan...
+ >>>>>>> merge rev: 10f9a0a634e8 - test: removed file1, changed file2, c...
Exercise transitions between local, other, fail and prompt, and make sure the
dirstate stays consistent. (Compare with each other and to the above
diff --git a/tests/test-fastannotate-hg.t b/tests/test-fastannotate-hg.t
--- a/tests/test-fastannotate-hg.t
+++ b/tests/test-fastannotate-hg.t
@@ -165,16 +165,16 @@
a
a
a
- <<<<<<< working copy: 5fbdc1152d97 - test: b2.1
+ <<<<<<< working copy: 5fbdc1152d97 - test: b2.1
b4
c
b5
- ||||||| base: 3086dbafde1c - test: b
+ ||||||| common ancestor: 3086dbafde1c - test: b
=======
b4
b5
b6
- >>>>>>> merge rev: 37ec9f5c3d1f - test: b2
+ >>>>>>> merge rev: 37ec9f5c3d1f - test: b2
$ cat <<EOF > b
> a
> a
@@ -789,16 +789,16 @@
warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
[1]
$ cat a
- <<<<<<< working copy: 0a068f0261cf - test: 3
+ <<<<<<< working copy: 0a068f0261cf - test: 3
1
2
3
- ||||||| base: 1ed24be7e7a0 - test: 2
+ ||||||| common ancestor: 1ed24be7e7a0 - test: 2
1
2
=======
a
- >>>>>>> merge rev: 9409851bc20a - test: a
+ >>>>>>> merge rev: 9409851bc20a - test: a
$ cat > a << EOF
> b
> 1
diff --git a/tests/test-conflict.t b/tests/test-conflict.t
--- a/tests/test-conflict.t
+++ b/tests/test-conflict.t
@@ -267,7 +267,7 @@
3
6
8
- ||||||| base
+ ||||||| common ancestor
One
Two
Three
diff --git a/tests/test-annotate.t b/tests/test-annotate.t
--- a/tests/test-annotate.t
+++ b/tests/test-annotate.t
@@ -221,16 +221,16 @@
a
a
a
- <<<<<<< working copy: 5fbdc1152d97 - test: b2.1
+ <<<<<<< working copy: 5fbdc1152d97 - test: b2.1
b4
c
b5
- ||||||| base: 3086dbafde1c - test: b
+ ||||||| common ancestor: 3086dbafde1c - test: b
=======
b4
b5
b6
- >>>>>>> merge rev: 37ec9f5c3d1f - test: b2
+ >>>>>>> merge rev: 37ec9f5c3d1f - test: b2
$ cat <<EOF > b
> a
> a
@@ -747,16 +747,16 @@
0
1 baz:1
2 baz:2
- <<<<<<< working copy: 863de62655ef - test: baz:3+->3-
+ <<<<<<< working copy: 863de62655ef - test: baz:3+->3-
3- baz:3
4 baz:4
- ||||||| base: 56fc739c091f - test: baz:3->3+
+ ||||||| common ancestor: 56fc739c091f - test: baz:3->3+
3+ baz:3
4 baz:4
=======
3+ baz:3
4+ baz:4
- >>>>>>> merge rev: cb8df70ae185 - test: qux:4->4+
+ >>>>>>> merge rev: cb8df70ae185 - test: qux:4->4+
5
6
7
@@ -794,16 +794,16 @@
0
1 baz:1
2 baz:2
- <<<<<<< working copy: cb8df70ae185 - test: qux:4->4+
+ <<<<<<< working copy: cb8df70ae185 - test: qux:4->4+
3+ baz:3
4+ baz:4
- ||||||| base: 56fc739c091f - test: baz:3->3+
+ ||||||| common ancestor: 56fc739c091f - test: baz:3->3+
3+ baz:3
4 baz:4
=======
3- baz:3
4 baz:4
- >>>>>>> merge rev: 863de62655ef - test: baz:3+->3-
+ >>>>>>> merge rev: 863de62655ef - test: baz:3+->3-
5
6
7
@@ -1172,16 +1172,16 @@
warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
[1]
$ cat a
- <<<<<<< working copy: 0a068f0261cf - test: 3
+ <<<<<<< working copy: 0a068f0261cf - test: 3
1
2
3
- ||||||| base: 1ed24be7e7a0 - test: 2
+ ||||||| common ancestor: 1ed24be7e7a0 - test: 2
1
2
=======
a
- >>>>>>> merge rev: 9409851bc20a - test: a
+ >>>>>>> merge rev: 9409851bc20a - test: a
$ cat > a << EOF
> b
> 1
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4914,7 +4914,7 @@
overrides = {(b'ui', b'forcemerge'): opts.get(b'tool', b'')}
with ui.configoverride(overrides, b'merge'):
force = opts.get(b'force')
- labels = [b'working copy', b'merge rev']
+ labels = [b'working copy', b'merge rev', b'common ancestor']
return hg.merge(ctx, force=force, labels=labels)
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list