Patchwork conflicts: make spacing consistent in conflict markers

login
register
mail settings
Submitter Kostia Balytskyi
Date Nov. 19, 2016, 11:42 p.m.
Message ID <5f03a63d6def1cf3c34f.1479598974@dev1902.lla1.facebook.com>
Download mbox | patch
Permalink /patch/17640/
State Accepted
Headers show

Comments

Kostia Balytskyi - Nov. 19, 2016, 11:42 p.m.
# HG changeset patch
# User Kostia Balytskyi <ikostia@fb.com>
# Date 1479598897 28800
#      Sat Nov 19 15:41:37 2016 -0800
# Node ID 5f03a63d6def1cf3c34fa7f8979c34151a9ba660
# Parent  0c3a8b6239db2c0d6a0e9ddea2266445bca2d440
conflicts: make spacing consistent in conflict markers

The way default marker template was defined before this patch,
the spacing before dash in conflict markes was dependent on
whether changeset is a tip one or not. This is a relevant part
of template:
    '{ifeq(tags, "tip", "", "{tags} "}'
If revision is a tip revision with no other tags, this would
resolve to an empty string, but for revisions which are not tip
and don't have any other tags, this would resolve to a single
space string. In the end this causes weirdnesses like the ones
you can see in the affected tests.

This is a not a big deal, but double spacing may be visually
less pleasant.

Please note that test changes where commit hashes change are
the result of marking files as resolved without removing markers.
Augie Fackler - Nov. 20, 2016, 2:18 a.m.
On Sat, Nov 19, 2016 at 03:42:54PM -0800, Kostia Balytskyi wrote:
> # HG changeset patch
> # User Kostia Balytskyi <ikostia@fb.com>
> # Date 1479598897 28800
> #      Sat Nov 19 15:41:37 2016 -0800
> # Node ID 5f03a63d6def1cf3c34fa7f8979c34151a9ba660
> # Parent  0c3a8b6239db2c0d6a0e9ddea2266445bca2d440
> conflicts: make spacing consistent in conflict markers

Queued, thanks
Yuya Nishihara - Nov. 20, 2016, 4:12 a.m.
On Sat, 19 Nov 2016 15:42:54 -0800, Kostia Balytskyi wrote:
> # HG changeset patch
> # User Kostia Balytskyi <ikostia@fb.com>
> # Date 1479598897 28800
> #      Sat Nov 19 15:41:37 2016 -0800
> # Node ID 5f03a63d6def1cf3c34fa7f8979c34151a9ba660
> # Parent  0c3a8b6239db2c0d6a0e9ddea2266445bca2d440
> conflicts: make spacing consistent in conflict markers
> 
> The way default marker template was defined before this patch,
> the spacing before dash in conflict markes was dependent on
> whether changeset is a tip one or not. This is a relevant part
> of template:
>     '{ifeq(tags, "tip", "", "{tags} "}'
> If revision is a tip revision with no other tags, this would
> resolve to an empty string, but for revisions which are not tip
> and don't have any other tags, this would resolve to a single
> space string. In the end this causes weirdnesses like the ones
> you can see in the affected tests.
> 
> This is a not a big deal, but double spacing may be visually
> less pleasant.
> 
> Please note that test changes where commit hashes change are
> the result of marking files as resolved without removing markers.
> 
> diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
> --- a/mercurial/filemerge.py
> +++ b/mercurial/filemerge.py
> @@ -518,7 +518,8 @@ def _formatconflictmarker(repo, ctx, tem
>      return util.ellipsis(mark, 80 - 8)
>  
>  _defaultconflictmarker = ('{node|short} '
> -                          '{ifeq(tags, "tip", "", "{tags} ")}'
> +                          '{ifeq(tags, "tip", "", '
> +                           'ifeq(tags, "", "", "{tags} "))}'
>                            '{if(bookmarks, "{bookmarks} ")}'
>                            '{ifeq(branch, "default", "", "{branch} ")}'
>                            '- {author|user}: {desc|firstline}')

Maybe we can use separate() function.

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -518,7 +518,8 @@  def _formatconflictmarker(repo, ctx, tem
     return util.ellipsis(mark, 80 - 8)
 
 _defaultconflictmarker = ('{node|short} '
-                          '{ifeq(tags, "tip", "", "{tags} ")}'
+                          '{ifeq(tags, "tip", "", '
+                           'ifeq(tags, "", "", "{tags} "))}'
                           '{if(bookmarks, "{bookmarks} ")}'
                           '{ifeq(branch, "default", "", "{branch} ")}'
                           '- {author|user}: {desc|firstline}')
diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t
--- a/tests/test-commit-amend.t
+++ b/tests/test-commit-amend.t
@@ -638,7 +638,7 @@  Amend a merge changeset (with renames an
   (no more unresolved files)
   $ hg ci -m 'merge bar'
   $ hg log --config diff.git=1 -pr .
-  changeset:   23:69c24fe01e35
+  changeset:   23:163cfd7219f7
   tag:         tip
   parent:      22:30d96aeaf27b
   parent:      21:1aa437659d19
@@ -657,7 +657,7 @@  Amend a merge changeset (with renames an
    dd
   +=======
   +cc
-  +>>>>>>> merge rev:    1aa437659d19  bar - test: aazzcc
+  +>>>>>>> merge rev:    1aa437659d19 bar - test: aazzcc
   diff --git a/z b/zz
   rename from z
   rename to zz
@@ -671,7 +671,7 @@  Amend a merge changeset (with renames an
   $ HGEDITOR="sh .hg/checkeditform.sh" hg ci --amend -m 'merge bar (amend message)' --edit
   HGEDITFORM=commit.amend.merge
   $ hg log --config diff.git=1 -pr .
-  changeset:   24:cfa2fbef3169
+  changeset:   24:bca52d4ed186
   tag:         tip
   parent:      22:30d96aeaf27b
   parent:      21:1aa437659d19
@@ -690,7 +690,7 @@  Amend a merge changeset (with renames an
    dd
   +=======
   +cc
-  +>>>>>>> merge rev:    1aa437659d19  bar - test: aazzcc
+  +>>>>>>> merge rev:    1aa437659d19 bar - test: aazzcc
   diff --git a/z b/zz
   rename from z
   rename to zz
@@ -704,7 +704,7 @@  Amend a merge changeset (with renames an
   $ hg mv zz z
   $ hg ci --amend -m 'merge bar (undo rename)'
   $ hg log --config diff.git=1 -pr .
-  changeset:   26:c34de68b014c
+  changeset:   26:12594a98ca3f
   tag:         tip
   parent:      22:30d96aeaf27b
   parent:      21:1aa437659d19
@@ -723,7 +723,7 @@  Amend a merge changeset (with renames an
    dd
   +=======
   +cc
-  +>>>>>>> merge rev:    1aa437659d19  bar - test: aazzcc
+  +>>>>>>> merge rev:    1aa437659d19 bar - test: aazzcc
   
   $ hg debugrename z
   z not renamed
@@ -740,9 +740,9 @@  Amend a merge changeset (with renames du
   $ echo aa >> aaa
   $ hg ci -m 'merge bar again'
   $ hg log --config diff.git=1 -pr .
-  changeset:   28:37d40dcef03b
+  changeset:   28:dffde028b388
   tag:         tip
-  parent:      26:c34de68b014c
+  parent:      26:12594a98ca3f
   parent:      27:4c94d5bc65f5
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -775,9 +775,9 @@  Amend a merge changeset (with renames du
   $ hg mv aaa aa
   $ hg ci --amend -m 'merge bar again (undo rename)'
   $ hg log --config diff.git=1 -pr .
-  changeset:   30:537c6d1b3633
+  changeset:   30:18e3ba160489
   tag:         tip
-  parent:      26:c34de68b014c
+  parent:      26:12594a98ca3f
   parent:      27:4c94d5bc65f5
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -817,9 +817,9 @@  Amend a merge changeset (with manifest-l
   use (c)hanged version, (d)elete, or leave (u)nresolved? c
   $ hg ci -m 'merge bar (with conflicts)'
   $ hg log --config diff.git=1 -pr .
-  changeset:   33:7afcba911942
+  changeset:   33:b4c3035e2544
   tag:         tip
-  parent:      32:6075d69d215d
+  parent:      32:4b216ca5ba97
   parent:      31:67db8847a540
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -829,9 +829,9 @@  Amend a merge changeset (with manifest-l
   $ hg rm aa
   $ hg ci --amend -m 'merge bar (with conflicts, amended)'
   $ hg log --config diff.git=1 -pr .
-  changeset:   35:376965e47ddd
+  changeset:   35:1205ed810051
   tag:         tip
-  parent:      32:6075d69d215d
+  parent:      32:4b216ca5ba97
   parent:      31:67db8847a540
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -927,7 +927,7 @@  Test that "diff()" in committemplate wor
   HG: M: 
   HG: A: foo
   HG: R: 
-  HG: diff -r 376965e47ddd foo
+  HG: diff -r 1205ed810051 foo
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
@@ -941,12 +941,12 @@  Test that "diff()" in committemplate wor
   HG: M: 
   HG: A: foo y
   HG: R: 
-  HG: diff -r 376965e47ddd foo
+  HG: diff -r 1205ed810051 foo
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
   HG: +foo
-  HG: diff -r 376965e47ddd y
+  HG: diff -r 1205ed810051 y
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
@@ -959,18 +959,18 @@  Test that "diff()" in committemplate wor
   HG: M: 
   HG: A: foo y
   HG: R: a
-  HG: diff -r 376965e47ddd a
+  HG: diff -r 1205ed810051 a
   HG: --- a/a	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -1,2 +0,0 @@
   HG: -a
   HG: -a
-  HG: diff -r 376965e47ddd foo
+  HG: diff -r 1205ed810051 foo
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
   HG: +foo
-  HG: diff -r 376965e47ddd y
+  HG: diff -r 1205ed810051 y
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
@@ -983,23 +983,23 @@  Test that "diff()" in committemplate wor
   HG: M: 
   HG: A: foo y
   HG: R: a x
-  HG: diff -r 376965e47ddd a
+  HG: diff -r 1205ed810051 a
   HG: --- a/a	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -1,2 +0,0 @@
   HG: -a
   HG: -a
-  HG: diff -r 376965e47ddd foo
+  HG: diff -r 1205ed810051 foo
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
   HG: +foo
-  HG: diff -r 376965e47ddd x
+  HG: diff -r 1205ed810051 x
   HG: --- a/x	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -1,1 +0,0 @@
   HG: -x
-  HG: diff -r 376965e47ddd y
+  HG: diff -r 1205ed810051 y
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
@@ -1014,23 +1014,23 @@  Test that "diff()" in committemplate wor
   HG: M: 
   HG: A: foo y
   HG: R: a x
-  HG: diff -r 376965e47ddd a
+  HG: diff -r 1205ed810051 a
   HG: --- a/a	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -1,2 +0,0 @@
   HG: -a
   HG: -a
-  HG: diff -r 376965e47ddd foo
+  HG: diff -r 1205ed810051 foo
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
   HG: +foo
-  HG: diff -r 376965e47ddd x
+  HG: diff -r 1205ed810051 x
   HG: --- a/x	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -1,1 +0,0 @@
   HG: -x
-  HG: diff -r 376965e47ddd y
+  HG: diff -r 1205ed810051 y
   HG: --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   HG: +++ b/y	Thu Jan 01 00:00:00 1970 +0000
   HG: @@ -0,0 +1,1 @@
diff --git a/tests/test-conflict.t b/tests/test-conflict.t
--- a/tests/test-conflict.t
+++ b/tests/test-conflict.t
@@ -55,7 +55,7 @@ 
   =======
   4
   5
-  >>>>>>> merge rev:    c0c68e4fe667  - test: branch1
+  >>>>>>> merge rev:    c0c68e4fe667 - test: branch1
   Hop we are done.
 
   $ hg status
diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -456,7 +456,7 @@  Resolve conflicted graft
   c
   =======
   b
-  >>>>>>> graft: 5d205f8b35b6  - bar: 1
+  >>>>>>> graft: 5d205f8b35b6 - bar: 1
   $ echo b > a
   $ hg resolve -m a
   (no more unresolved files)
diff --git a/tests/test-keyword.t b/tests/test-keyword.t
--- a/tests/test-keyword.t
+++ b/tests/test-keyword.t
@@ -1117,7 +1117,7 @@  conflict: keyword should stay outside co
   bar
   =======
   foo
-  >>>>>>> merge rev:    85d2d2d732a5  - test: simplemerge
+  >>>>>>> merge rev:    85d2d2d732a5 - test: simplemerge
 
 resolve to local, m must contain hash of last change (local parent)
 
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
@@ -107,7 +107,7 @@  Non-interactive merge:
   changed2
   =======
   changed1
-  >>>>>>> merge rev:    10f9a0a634e8  - test: removed file1, changed file2, cha...
+  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
 
 
 Interactive merge:
@@ -171,7 +171,7 @@  Interactive merge:
   changed2
   =======
   changed1
-  >>>>>>> merge rev:    10f9a0a634e8  - test: removed file1, changed file2, cha...
+  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
 
 
 Interactive merge with bad input:
@@ -247,7 +247,7 @@  Interactive merge with bad input:
   changed2
   =======
   changed1
-  >>>>>>> merge rev:    10f9a0a634e8  - test: removed file1, changed file2, cha...
+  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
 
 
 Interactive merge with not enough input:
@@ -310,7 +310,7 @@  Interactive merge with not enough input:
   changed2
   =======
   changed1
-  >>>>>>> merge rev:    10f9a0a634e8  - test: removed file1, changed file2, cha...
+  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
 
 Choose local versions of files
 
@@ -635,7 +635,7 @@  Choose to merge all files
   ||||||| base
   =======
   changed1
-  >>>>>>> merge rev:    10f9a0a634e8  - test: removed file1, changed file2, cha...
+  >>>>>>> merge rev:    10f9a0a634e8 - test: removed file1, changed file2, chan...
 
 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-merge-force.t b/tests/test-merge-force.t
--- a/tests/test-merge-force.t
+++ b/tests/test-merge-force.t
@@ -379,7 +379,7 @@  the remote side did not touch the file
   content1
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M content1_content2_content1_content4-untracked
   content2
@@ -409,7 +409,7 @@  the remote side did not touch the file
   content1
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M content1_content2_content2_content4-untracked
   content2
@@ -439,7 +439,7 @@  the remote side did not touch the file
   content1
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M content1_content2_content3_content3-untracked
   content2
@@ -451,7 +451,7 @@  the remote side did not touch the file
   content1
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M content1_content2_content3_content4-untracked
   content2
@@ -481,7 +481,7 @@  the remote side did not touch the file
   content1
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M content1_content2_missing_content4-untracked
   content2
@@ -564,7 +564,7 @@  the remote side did not touch the file
   ||||||| base
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M missing_content2_content2_content4-untracked
   content2
@@ -587,7 +587,7 @@  the remote side did not touch the file
   ||||||| base
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M missing_content2_content3_content3-untracked
   content2
@@ -598,7 +598,7 @@  the remote side did not touch the file
   ||||||| base
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M missing_content2_content3_content4-untracked
   content2
@@ -621,7 +621,7 @@  the remote side did not touch the file
   ||||||| base
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M missing_content2_missing_content4-untracked
   <<<<<<< working copy: 0447570f1af6 - test: local
@@ -629,7 +629,7 @@  the remote side did not touch the file
   ||||||| base
   =======
   content2
-  >>>>>>> merge rev:    85100b8c675b  - test: remote
+  >>>>>>> merge rev:    85100b8c675b - test: remote
   
   M missing_content2_missing_missing-tracked
   content2
diff --git a/tests/test-merge-revert2.t b/tests/test-merge-revert2.t
--- a/tests/test-merge-revert2.t
+++ b/tests/test-merge-revert2.t
@@ -56,7 +56,7 @@ 
   @@ -1,3 +1,7 @@
    added file1
    another line of text
-  +<<<<<<< working copy: c3fa057dd86f  - test: added file1 and file2
+  +<<<<<<< working copy: c3fa057dd86f - test: added file1 and file2
   +changed file1 different
   +=======
    changed file1
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
@@ -75,11 +75,11 @@  running from a devel copy, not a temp in
   [1]
   $ aftermerge
   # cat f
-  <<<<<<< working copy: ef83787e2614  - test: revision 1
+  <<<<<<< working copy: ef83787e2614 - test: revision 1
   revision 1
   =======
   revision 2
-  >>>>>>> merge rev:    0185f4e0cf02  - test: revision 2
+  >>>>>>> merge rev:    0185f4e0cf02 - test: revision 2
   space
   # hg stat
   M f
@@ -935,7 +935,7 @@  premerge=keep keeps conflict markers in:
   # hg update -C 1
   $ hg merge -r 4 --config merge-tools.true.premerge=keep
   merging f
-  <<<<<<< working copy: ef83787e2614  - test: revision 1
+  <<<<<<< working copy: ef83787e2614 - test: revision 1
   revision 1
   space
   =======
@@ -948,7 +948,7 @@  premerge=keep keeps conflict markers in:
   (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
   =======
@@ -969,7 +969,7 @@  premerge=keep-merge3 keeps conflict mark
   # 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
@@ -985,7 +985,7 @@  premerge=keep-merge3 keeps conflict mark
   (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
diff --git a/tests/test-merge-types.t b/tests/test-merge-types.t
--- a/tests/test-merge-types.t
+++ b/tests/test-merge-types.t
@@ -367,14 +367,14 @@  h: l vs l, different
   2
   =======
   1
-  >>>>>>> merge rev:    2e60aa20b912  - test: 1
+  >>>>>>> merge rev:    2e60aa20b912 - test: 1
   $ tellmeabout b
   b is a plain file with content:
   <<<<<<< working copy: 0c617753b41b - test: 2
   2
   =======
   1
-  >>>>>>> merge rev:    2e60aa20b912  - test: 1
+  >>>>>>> merge rev:    2e60aa20b912 - test: 1
   $ tellmeabout c
   c is a plain file with content:
   x
@@ -418,14 +418,14 @@  h: l vs l, different
   [1]
   $ tellmeabout a
   a is a plain file with content:
-  <<<<<<< working copy: 2e60aa20b912  - test: 1
+  <<<<<<< working copy: 2e60aa20b912 - test: 1
   1
   =======
   2
   >>>>>>> merge rev:    0c617753b41b - test: 2
   $ tellmeabout b
   b is an executable file with content:
-  <<<<<<< working copy: 2e60aa20b912  - test: 1
+  <<<<<<< working copy: 2e60aa20b912 - test: 1
   1
   =======
   2
diff --git a/tests/test-merge7.t b/tests/test-merge7.t
--- a/tests/test-merge7.t
+++ b/tests/test-merge7.t
@@ -99,7 +99,7 @@  pull and merge from test-a again
 
   $ cat test.txt
   one
-  <<<<<<< working copy: 50c3a7e29886  - test: Merge 1
+  <<<<<<< working copy: 50c3a7e29886 - test: Merge 1
   two-point-five
   =======
   two-point-one
diff --git a/tests/test-rebase-collapse.t b/tests/test-rebase-collapse.t
--- a/tests/test-rebase-collapse.t
+++ b/tests/test-rebase-collapse.t
@@ -836,7 +836,7 @@  running into merge conflict and invoking
   rebasing 2:b8d8db2b242d "a-dev" (tip)
   saved backup bundle to $TESTTMP/collapse_remember_message/.hg/strip-backup/b8d8db2b242d-f474c19a-backup.hg (glob)
   $ hg log
-  changeset:   2:12bb766dceb1
+  changeset:   2:45ba1d1a8665
   tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
diff --git a/tests/test-rebase-conflicts.t b/tests/test-rebase-conflicts.t
--- a/tests/test-rebase-conflicts.t
+++ b/tests/test-rebase-conflicts.t
@@ -333,7 +333,7 @@  Test minimization of merge conflicts
   @@ -1,2 +1,6 @@
    a
    b
-  +<<<<<<< dest:   328e4ab1f7cc  ab - test: ab
+  +<<<<<<< dest:   328e4ab1f7cc ab - test: ab
   +=======
   +c
   +>>>>>>> source: 7bc217434fc1 - test: abc
@@ -352,7 +352,7 @@  Test minimization of merge conflicts
   +++ b/a	* (glob)
   @@ -1,2 +1,8 @@
    a
-  +<<<<<<< dest:   328e4ab1f7cc  ab - test: ab
+  +<<<<<<< dest:   328e4ab1f7cc ab - test: ab
    b
   +||||||| base
   +=======
diff --git a/tests/test-rename-dir-merge.t b/tests/test-rename-dir-merge.t
--- a/tests/test-rename-dir-merge.t
+++ b/tests/test-rename-dir-merge.t
@@ -148,7 +148,7 @@  and committed in local target directory.
   target
   =======
   baz
-  >>>>>>> merge rev:    ce36d17b18fb  - test: 2 add a/c
+  >>>>>>> merge rev:    ce36d17b18fb - test: 2 add a/c
   $ rm b/c.orig
 
 Remote directory rename with conflicting file added in remote target directory
@@ -177,7 +177,7 @@  and committed in local source directory.
   ? a/d
   ? b/c.orig
   $ cat b/c
-  <<<<<<< working copy: ce36d17b18fb  - test: 2 add a/c
+  <<<<<<< working copy: ce36d17b18fb - test: 2 add a/c
   baz
   =======
   target
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -332,7 +332,7 @@  ensure that we have a merge with unresol
   +++ b/a/a
   @@ -1,2 +1,6 @@
    a
-  +<<<<<<< dest:   *  - shelve: pending changes temporary commit (glob)
+  +<<<<<<< dest:   * - shelve: pending changes temporary commit (glob)
    c
   +=======
   +a
@@ -759,7 +759,7 @@  unshelve and conflicts with tracked and 
   M f
   ? f.orig
   $ cat f
-  <<<<<<< dest:   5f6b880e719b  - shelve: pending changes temporary commit
+  <<<<<<< dest:   5f6b880e719b - shelve: pending changes temporary commit
   g
   =======
   f
@@ -804,7 +804,7 @@  unshelve and conflicts with tracked and 
   M f
   ? f.orig
   $ cat f
-  <<<<<<< dest:   *  - test: intermediate other change (glob)
+  <<<<<<< dest:   * - test: intermediate other change (glob)
   g
   =======
   f
diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t
--- a/tests/test-subrepo.t
+++ b/tests/test-subrepo.t
@@ -332,7 +332,7 @@  should conflict
   conflict
   =======
   t3
-  >>>>>>> other: 7af322bc1198  - test: 7
+  >>>>>>> other: 7af322bc1198 - test: 7
 
 11: remove subrepo t