Patchwork [5,of,5] merge: add other/local markers [RFC]

login
register
mail settings
Submitter timeless@mozdev.org
Date March 17, 2016, 3:46 p.m.
Message ID <526227903b73939339ad.1458229612@waste.org>
Download mbox | patch
Permalink /patch/13923/
State Deferred
Headers show

Comments

timeless@mozdev.org - March 17, 2016, 3:46 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1458226294 0
#      Thu Mar 17 14:51:34 2016 +0000
# Node ID 526227903b73939339ad3d8966e444e0a94a30a2
# Parent  8472502ee330689965b34f4bf51286ed4b481203
merge: add other/local markers [RFC]

Adds other/local markers to summary, parents, and log commands
Pierre-Yves David - March 19, 2016, 5:29 p.m.
On 03/17/2016 08:46 AM, timeless wrote:
> # HG changeset patch
> # User timeless <timeless@mozdev.org>
> # Date 1458226294 0
> #      Thu Mar 17 14:51:34 2016 +0000
> # Node ID 526227903b73939339ad3d8966e444e0a94a30a2
> # Parent  8472502ee330689965b34f4bf51286ed4b481203
> merge: add other/local markers [RFC]
>
> Adds other/local markers to summary, parents, and log commands

Can we get them in different patch so that we can discuss their form 
separatly ?

>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -6542,6 +6542,19 @@
>           # i18n: column positioning for "hg summary"
>           ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
>                    label='log.changeset changeset.%s' % p.phasestr())
> +        if len(parents) == 2:
> +            # these are not for translation
> +            if ms is not None:
> +                if p == ms.localctx:
> +                    ui.write(":local ")
> +                elif p == ms.otherctx:
> +                    ui.write(":other ")
> +            else:
> +                if p == parents[0]:
> +                    ui.write(":local ")
> +                elif p == parents[1]:
> +                    ui.write(":other ")
> +
>           ui.write(' '.join(p.tags()), label='log.tag')
>           if p.bookmarks():
>               marks.extend(p.bookmarks())
> diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py
> --- a/mercurial/namespaces.py
> +++ b/mercurial/namespaces.py
> @@ -49,6 +49,35 @@
>                         deprecated=set(['tip']))
>           self.addnamespace(n)
>
> +        def mergenamemap(repo, name):
> +            p = repo[None].parents()
> +            if len(p) < 2:
> +                return []
> +            if name == 'local':
> +                return [p[0]]
> +            if name == 'other':
> +                return [p[1]]
> +            return []
> +
> +        def mergenodemap(repo, node):
> +            p = repo[None].parents()
> +            if len(p) < 2:
> +                return []
> +            if node == p[0].node():
> +                return ['local']
> +            if node == p[1].node():
> +                return ['other']
> +            return []
> +
> +        n = namespace("mergeref", templatename="mergeref",
> +                      # i18n: column positioning for "hg log"
> +                      logfmt=_("mergeref:    %s\n"),
> +                      listnames=lambda repo: ['local', 'other'],
> +                      namemap=mergenamemap,
> +                      nodemap=mergenodemap,
> +                      )
> +        self.addnamespace(n)
> +
>           bnames = lambda repo: repo.branchmap().keys()
>           bnamemap = lambda repo, name: tolist(repo.branchtip(name, True))
>           bnodemap = lambda repo, node: [repo[node].branch()]
> diff --git a/tests/test-backout.t b/tests/test-backout.t
> --- a/tests/test-backout.t
> +++ b/tests/test-backout.t
> @@ -550,9 +550,9 @@
>     0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>     (branch merge, don't forget to commit)
>     $ hg summary
> -  parent: 2:45bbcd363bf0
> +  parent: 2:45bbcd363bf0 :local

That ":local" is quiet confusing. It looks like a tag and the ":" only 
make sense for --tool" so it is fairly obscure from a new user 
perspective. We could maybe get the information on a another line?


>      file2
> -  parent: 3:d4e8f6db59fb tip
> +  parent: 3:d4e8f6db59fb :other tip
>      backout on branch1
>     branch: branch2
>     commit: 1 removed (merge)
> diff --git a/tests/test-bookmarks-merge.t b/tests/test-bookmarks-merge.t
> --- a/tests/test-bookmarks-merge.t
> +++ b/tests/test-bookmarks-merge.t
> @@ -87,12 +87,14 @@
>     $ hg parents
>     changeset:   4:a0546fcfe0fb
>     bookmark:    e@diverged
> +  mergeref:    local

"ref" ? we don't use ref anywhere else in the UI. "merge-label?"

>     user:        test
>     date:        Thu Jan 01 00:00:00 1970 +0000
>     summary:     d
>
>     changeset:   5:26bee9c5bcf3
>     bookmark:    e
> +  mergeref:    other
>     parent:      3:b8f96cf4688b
>     user:        test
>     date:        Thu Jan 01 00:00:00 1970 +0000
> diff --git a/tests/test-command-template.t b/tests/test-command-template.t
> --- a/tests/test-command-template.t
> +++ b/tests/test-command-template.t
> @@ -3412,12 +3412,13 @@
>   Test namespaces dict
>
>     $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n'
> -  2 bookmarks=bar,foo tags=tip branches=text.{rev}
> -  1 bookmarks=baz tags= branches=text.{rev}
> -  0 bookmarks= tags= branches=default
> +  2 bookmarks=bar,foo tags=tip mergeref= branches=text.{rev}
> +  1 bookmarks=baz tags= mergeref= branches=text.{rev}
> +  0 bookmarks= tags= mergeref= branches=default
>     $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
>     bookmarks: bar foo
>     tags: tip
> +  mergeref:
>     branches: text.{rev}
>     $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
>     bookmarks:
> @@ -3425,6 +3426,7 @@
>      foo
>     tags:
>      tip
> +  mergeref:
>     branches:
>      text.{rev}
>     $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
> diff --git a/tests/test-completion.t b/tests/test-completion.t
> --- a/tests/test-completion.t
> +++ b/tests/test-completion.t
> @@ -343,6 +343,8 @@
>     fee
>     fie
>     fo
> +  local
> +  other
>     tip
>     $ hg debugnamecomplete f
>     fee
> diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
> --- a/tests/test-globalopts.t
> +++ b/tests/test-globalopts.t
> @@ -101,6 +101,7 @@
>     $ hg --repo c tip
>     changeset:   1:b6c483daf290
>     tag:         tip
> +  mergeref:    other
>     parent:      -1:000000000000
>     user:        test
>     date:        Thu Jan 01 00:00:01 1970 +0000
> @@ -112,6 +113,7 @@
>     $ hg --cwd a --cwd b --cwd c tip
>     changeset:   1:b6c483daf290
>     tag:         tip
> +  mergeref:    other
>     parent:      -1:000000000000
>     user:        test
>     date:        Thu Jan 01 00:00:01 1970 +0000
> @@ -183,6 +185,7 @@
>     $ hg --cwd c head -v
>     changeset:   1:b6c483daf290
>     tag:         tip
> +  mergeref:    other
>     parent:      -1:000000000000
>     user:        test
>     date:        Thu Jan 01 00:00:01 1970 +0000
> @@ -192,6 +195,7 @@
>
>
>     changeset:   0:8580ff50825a
> +  mergeref:    local
>     user:        test
>     date:        Thu Jan 01 00:00:01 1970 +0000
>     files:       a
> @@ -235,6 +239,7 @@
>     $ hg --cwd c log --debug
>     changeset:   1:b6c483daf2907ce5825c0bb50f5716226281cc1a
>     tag:         tip
> +  mergeref:    other
>     phase:       public
>     parent:      -1:0000000000000000000000000000000000000000
>     parent:      -1:0000000000000000000000000000000000000000
> @@ -248,6 +253,7 @@
>
>
>     changeset:   0:8580ff50825a50c8f716709acdf8de0deddcd6ab
> +  mergeref:    local
>     phase:       public
>     parent:      -1:0000000000000000000000000000000000000000
>     parent:      -1:0000000000000000000000000000000000000000
> diff --git a/tests/test-log.t b/tests/test-log.t
> --- a/tests/test-log.t
> +++ b/tests/test-log.t
> @@ -747,6 +747,7 @@
>     (branch merge, don't forget to commit)
>     $ hg log -r .
>     changeset:   3:e62f78d544b4
> +  mergeref:    local
>     parent:      1:3d5bf5654eda
>     user:        test
>     date:        Thu Jan 01 00:00:01 1970 +0000
> diff --git a/tests/test-merge7.t b/tests/test-merge7.t
> --- a/tests/test-merge7.t
> +++ b/tests/test-merge7.t
> @@ -117,12 +117,14 @@
>     $ hg log
>     changeset:   4:40d11a4173a8
>     tag:         tip
> +  mergeref:    other
>     parent:      2:96b70246a118
>     user:        test
>     date:        Thu Jan 01 00:00:00 1970 +0000
>     summary:     two -> two-point-one
>
>     changeset:   3:50c3a7e29886
> +  mergeref:    local
>     parent:      1:d1e159716d41
>     parent:      2:96b70246a118
>     user:        test
> diff --git a/tests/test-newbranch.t b/tests/test-newbranch.t
> --- a/tests/test-newbranch.t
> +++ b/tests/test-newbranch.t
> @@ -133,6 +133,7 @@
>     changeset:   4:adf1a74a7f7b
>     branch:      foo
>     tag:         tip
> +  mergeref:    local
>     parent:      1:6c0e42da283a
>     user:        test
>     date:        Thu Jan 01 00:00:00 1970 +0000
> @@ -144,6 +145,7 @@
>     changeset:   4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6
>     branch:      foo
>     tag:         tip
> +  mergeref:    local
>     phase:       draft
>     parent:      1:6c0e42da283a56b5edc5b4fadb491365ec7f5fa8
>     parent:      -1:0000000000000000000000000000000000000000
> diff --git a/tests/test-parents.t b/tests/test-parents.t
> --- a/tests/test-parents.t
> +++ b/tests/test-parents.t
> @@ -106,12 +106,14 @@
>     (branch merge, don't forget to commit)
>     $ hg parents c
>     changeset:   3:02d851b7e549
> +  mergeref:    local
>     user:        test
>     date:        Thu Jan 01 00:00:03 1970 +0000
>     summary:     c
>
>     changeset:   4:48cee28d4b4e
>     tag:         tip
> +  mergeref:    other
>     parent:      1:d786049f033a
>     user:        test
>     date:        Thu Jan 01 00:00:04 1970 +0000
> @@ -128,12 +130,14 @@
>     (branch merge, don't forget to commit)
>     $ hg parents
>     changeset:   2:6cfac479f009
> +  mergeref:    local
>     user:        test
>     date:        Thu Jan 01 00:00:02 1970 +0000
>     summary:     b
>
>     changeset:   4:48cee28d4b4e
>     tag:         tip
> +  mergeref:    other
>     parent:      1:d786049f033a
>     user:        test
>     date:        Thu Jan 01 00:00:04 1970 +0000
> @@ -145,6 +149,7 @@
>     $ hg parents c
>     changeset:   4:48cee28d4b4e
>     tag:         tip
> +  mergeref:    other
>     parent:      1:d786049f033a
>     user:        test
>     date:        Thu Jan 01 00:00:04 1970 +0000
> diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t
> --- a/tests/test-rebase-parameters.t
> +++ b/tests/test-rebase-parameters.t
> @@ -470,9 +470,9 @@
>     [1]
>
>     $ hg summary
> -  parent: 1:56daeba07f4b
> +  parent: 1:56daeba07f4b :local
>      c2
> -  parent: 2:e4e3f3546619 tip
> +  parent: 2:e4e3f3546619 :other tip
>      c2b
>     branch: default
>     commit: 1 modified, 1 unresolved (merge)
> diff --git a/tests/test-resolve.t b/tests/test-resolve.t
> --- a/tests/test-resolve.t
> +++ b/tests/test-resolve.t
> @@ -333,9 +333,9 @@
>     [255]
>     $ hg summary
>     warning: merge state has unsupported record types: X
> -  parent: 2:57653b9f834a
> +  parent: 2:57653b9f834a :local
>      append baz to files
> -  parent: 1:dc77451844e3
> +  parent: 1:dc77451844e3 :other
>      append bar to files
>     branch: default
>     commit: 2 modified, 2 unknown (merge)
> diff --git a/tests/test-revert.t b/tests/test-revert.t
> --- a/tests/test-revert.t
> +++ b/tests/test-revert.t
> @@ -403,9 +403,9 @@
>     2 files updated, 0 files merged, 1 files removed, 0 files unresolved
>     (branch merge, don't forget to commit)
>     $ hg summary
> -  parent: 2:b8ec310b2d4e tip
> +  parent: 2:b8ec310b2d4e :local tip
>      other adds
> -  parent: 1:f6180deb8fbe
> +  parent: 1:f6180deb8fbe :other
>      rename
>     branch: default
>     commit: 2 modified, 1 removed (merge)
> diff --git a/tests/test-strip.t b/tests/test-strip.t
> --- a/tests/test-strip.t
> +++ b/tests/test-strip.t
> @@ -260,12 +260,14 @@
>
>     $ hg parents
>     changeset:   2:65bd5f99a4a3
> +  mergeref:    local
>     user:        test
>     date:        Thu Jan 01 00:00:00 1970 +0000
>     summary:     d
>
>     changeset:   4:264128213d29
>     tag:         tip
> +  mergeref:    other
>     parent:      1:ef3a871183d7
>     user:        test
>     date:        Thu Jan 01 00:00:00 1970 +0000
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6542,6 +6542,19 @@ 
         # i18n: column positioning for "hg summary"
         ui.write(_('parent: %d:%s ') % (p.rev(), str(p)),
                  label='log.changeset changeset.%s' % p.phasestr())
+        if len(parents) == 2:
+            # these are not for translation
+            if ms is not None:
+                if p == ms.localctx:
+                    ui.write(":local ")
+                elif p == ms.otherctx:
+                    ui.write(":other ")
+            else:
+                if p == parents[0]:
+                    ui.write(":local ")
+                elif p == parents[1]:
+                    ui.write(":other ")
+
         ui.write(' '.join(p.tags()), label='log.tag')
         if p.bookmarks():
             marks.extend(p.bookmarks())
diff --git a/mercurial/namespaces.py b/mercurial/namespaces.py
--- a/mercurial/namespaces.py
+++ b/mercurial/namespaces.py
@@ -49,6 +49,35 @@ 
                       deprecated=set(['tip']))
         self.addnamespace(n)
 
+        def mergenamemap(repo, name):
+            p = repo[None].parents()
+            if len(p) < 2:
+                return []
+            if name == 'local':
+                return [p[0]]
+            if name == 'other':
+                return [p[1]]
+            return []
+
+        def mergenodemap(repo, node):
+            p = repo[None].parents()
+            if len(p) < 2:
+                return []
+            if node == p[0].node():
+                return ['local']
+            if node == p[1].node():
+                return ['other']
+            return []
+
+        n = namespace("mergeref", templatename="mergeref",
+                      # i18n: column positioning for "hg log"
+                      logfmt=_("mergeref:    %s\n"),
+                      listnames=lambda repo: ['local', 'other'],
+                      namemap=mergenamemap,
+                      nodemap=mergenodemap,
+                      )
+        self.addnamespace(n)
+
         bnames = lambda repo: repo.branchmap().keys()
         bnamemap = lambda repo, name: tolist(repo.branchtip(name, True))
         bnodemap = lambda repo, node: [repo[node].branch()]
diff --git a/tests/test-backout.t b/tests/test-backout.t
--- a/tests/test-backout.t
+++ b/tests/test-backout.t
@@ -550,9 +550,9 @@ 
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg summary
-  parent: 2:45bbcd363bf0 
+  parent: 2:45bbcd363bf0 :local 
    file2
-  parent: 3:d4e8f6db59fb tip
+  parent: 3:d4e8f6db59fb :other tip
    backout on branch1
   branch: branch2
   commit: 1 removed (merge)
diff --git a/tests/test-bookmarks-merge.t b/tests/test-bookmarks-merge.t
--- a/tests/test-bookmarks-merge.t
+++ b/tests/test-bookmarks-merge.t
@@ -87,12 +87,14 @@ 
   $ hg parents
   changeset:   4:a0546fcfe0fb
   bookmark:    e@diverged
+  mergeref:    local
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     d
   
   changeset:   5:26bee9c5bcf3
   bookmark:    e
+  mergeref:    other
   parent:      3:b8f96cf4688b
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
diff --git a/tests/test-command-template.t b/tests/test-command-template.t
--- a/tests/test-command-template.t
+++ b/tests/test-command-template.t
@@ -3412,12 +3412,13 @@ 
 Test namespaces dict
 
   $ hg log -T '{rev}{namespaces % " {namespace}={join(names, ",")}"}\n'
-  2 bookmarks=bar,foo tags=tip branches=text.{rev}
-  1 bookmarks=baz tags= branches=text.{rev}
-  0 bookmarks= tags= branches=default
+  2 bookmarks=bar,foo tags=tip mergeref= branches=text.{rev}
+  1 bookmarks=baz tags= mergeref= branches=text.{rev}
+  0 bookmarks= tags= mergeref= branches=default
   $ hg log -r2 -T '{namespaces % "{namespace}: {names}\n"}'
   bookmarks: bar foo
   tags: tip
+  mergeref: 
   branches: text.{rev}
   $ hg log -r2 -T '{namespaces % "{namespace}:\n{names % " {name}\n"}"}'
   bookmarks:
@@ -3425,6 +3426,7 @@ 
    foo
   tags:
    tip
+  mergeref:
   branches:
    text.{rev}
   $ hg log -r2 -T '{get(namespaces, "bookmarks") % "{name}\n"}'
diff --git a/tests/test-completion.t b/tests/test-completion.t
--- a/tests/test-completion.t
+++ b/tests/test-completion.t
@@ -343,6 +343,8 @@ 
   fee
   fie
   fo
+  local
+  other
   tip
   $ hg debugnamecomplete f
   fee
diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t
--- a/tests/test-globalopts.t
+++ b/tests/test-globalopts.t
@@ -101,6 +101,7 @@ 
   $ hg --repo c tip
   changeset:   1:b6c483daf290
   tag:         tip
+  mergeref:    other
   parent:      -1:000000000000
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
@@ -112,6 +113,7 @@ 
   $ hg --cwd a --cwd b --cwd c tip
   changeset:   1:b6c483daf290
   tag:         tip
+  mergeref:    other
   parent:      -1:000000000000
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
@@ -183,6 +185,7 @@ 
   $ hg --cwd c head -v
   changeset:   1:b6c483daf290
   tag:         tip
+  mergeref:    other
   parent:      -1:000000000000
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
@@ -192,6 +195,7 @@ 
   
   
   changeset:   0:8580ff50825a
+  mergeref:    local
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
   files:       a
@@ -235,6 +239,7 @@ 
   $ hg --cwd c log --debug
   changeset:   1:b6c483daf2907ce5825c0bb50f5716226281cc1a
   tag:         tip
+  mergeref:    other
   phase:       public
   parent:      -1:0000000000000000000000000000000000000000
   parent:      -1:0000000000000000000000000000000000000000
@@ -248,6 +253,7 @@ 
   
   
   changeset:   0:8580ff50825a50c8f716709acdf8de0deddcd6ab
+  mergeref:    local
   phase:       public
   parent:      -1:0000000000000000000000000000000000000000
   parent:      -1:0000000000000000000000000000000000000000
diff --git a/tests/test-log.t b/tests/test-log.t
--- a/tests/test-log.t
+++ b/tests/test-log.t
@@ -747,6 +747,7 @@ 
   (branch merge, don't forget to commit)
   $ hg log -r .
   changeset:   3:e62f78d544b4
+  mergeref:    local
   parent:      1:3d5bf5654eda
   user:        test
   date:        Thu Jan 01 00:00:01 1970 +0000
diff --git a/tests/test-merge7.t b/tests/test-merge7.t
--- a/tests/test-merge7.t
+++ b/tests/test-merge7.t
@@ -117,12 +117,14 @@ 
   $ hg log
   changeset:   4:40d11a4173a8
   tag:         tip
+  mergeref:    other
   parent:      2:96b70246a118
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     two -> two-point-one
   
   changeset:   3:50c3a7e29886
+  mergeref:    local
   parent:      1:d1e159716d41
   parent:      2:96b70246a118
   user:        test
diff --git a/tests/test-newbranch.t b/tests/test-newbranch.t
--- a/tests/test-newbranch.t
+++ b/tests/test-newbranch.t
@@ -133,6 +133,7 @@ 
   changeset:   4:adf1a74a7f7b
   branch:      foo
   tag:         tip
+  mergeref:    local
   parent:      1:6c0e42da283a
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
@@ -144,6 +145,7 @@ 
   changeset:   4:adf1a74a7f7b4cd193d12992f5d0d6a004ed21d6
   branch:      foo
   tag:         tip
+  mergeref:    local
   phase:       draft
   parent:      1:6c0e42da283a56b5edc5b4fadb491365ec7f5fa8
   parent:      -1:0000000000000000000000000000000000000000
diff --git a/tests/test-parents.t b/tests/test-parents.t
--- a/tests/test-parents.t
+++ b/tests/test-parents.t
@@ -106,12 +106,14 @@ 
   (branch merge, don't forget to commit)
   $ hg parents c
   changeset:   3:02d851b7e549
+  mergeref:    local
   user:        test
   date:        Thu Jan 01 00:00:03 1970 +0000
   summary:     c
   
   changeset:   4:48cee28d4b4e
   tag:         tip
+  mergeref:    other
   parent:      1:d786049f033a
   user:        test
   date:        Thu Jan 01 00:00:04 1970 +0000
@@ -128,12 +130,14 @@ 
   (branch merge, don't forget to commit)
   $ hg parents
   changeset:   2:6cfac479f009
+  mergeref:    local
   user:        test
   date:        Thu Jan 01 00:00:02 1970 +0000
   summary:     b
   
   changeset:   4:48cee28d4b4e
   tag:         tip
+  mergeref:    other
   parent:      1:d786049f033a
   user:        test
   date:        Thu Jan 01 00:00:04 1970 +0000
@@ -145,6 +149,7 @@ 
   $ hg parents c
   changeset:   4:48cee28d4b4e
   tag:         tip
+  mergeref:    other
   parent:      1:d786049f033a
   user:        test
   date:        Thu Jan 01 00:00:04 1970 +0000
diff --git a/tests/test-rebase-parameters.t b/tests/test-rebase-parameters.t
--- a/tests/test-rebase-parameters.t
+++ b/tests/test-rebase-parameters.t
@@ -470,9 +470,9 @@ 
   [1]
 
   $ hg summary
-  parent: 1:56daeba07f4b 
+  parent: 1:56daeba07f4b :local 
    c2
-  parent: 2:e4e3f3546619 tip
+  parent: 2:e4e3f3546619 :other tip
    c2b
   branch: default
   commit: 1 modified, 1 unresolved (merge)
diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -333,9 +333,9 @@ 
   [255]
   $ hg summary
   warning: merge state has unsupported record types: X
-  parent: 2:57653b9f834a 
+  parent: 2:57653b9f834a :local 
    append baz to files
-  parent: 1:dc77451844e3 
+  parent: 1:dc77451844e3 :other 
    append bar to files
   branch: default
   commit: 2 modified, 2 unknown (merge)
diff --git a/tests/test-revert.t b/tests/test-revert.t
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -403,9 +403,9 @@ 
   2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg summary
-  parent: 2:b8ec310b2d4e tip
+  parent: 2:b8ec310b2d4e :local tip
    other adds
-  parent: 1:f6180deb8fbe 
+  parent: 1:f6180deb8fbe :other 
    rename
   branch: default
   commit: 2 modified, 1 removed (merge)
diff --git a/tests/test-strip.t b/tests/test-strip.t
--- a/tests/test-strip.t
+++ b/tests/test-strip.t
@@ -260,12 +260,14 @@ 
 
   $ hg parents
   changeset:   2:65bd5f99a4a3
+  mergeref:    local
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     d
   
   changeset:   4:264128213d29
   tag:         tip
+  mergeref:    other
   parent:      1:ef3a871183d7
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000