[PATCH 4 of 5 v2] summary: add other/local markers for merges [RFC]

timeless timeless at mozdev.org
Tue Mar 22 23:23:59 EDT 2016


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1458683883 0
#      Tue Mar 22 21:58:03 2016 +0000
# Node ID f8b55256f2bf7613df37760b87052cb79c036834
# Parent  4bff81fb8154285cf1c9a335d6700eab7cc81bb1
summary: add other/local markers for merges [RFC]

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6602,6 +6602,14 @@
             else:
                 ui.write(_(' (no revision checked out)'))
         ui.write('\n')
+        if conflicts:
+            merging = ''
+            # these are not for translation
+            if p == localctx:
+                merging = 'local'
+            elif p == otherctx:
+                merging = 'other'
+            ui.write(_('merging: %s\n') % merging)
         if p.description():
             ui.status(' ' + p.description().splitlines()[0].strip() + '\n',
                       label='log.summary')
diff --git a/tests/test-backout.t b/tests/test-backout.t
--- a/tests/test-backout.t
+++ b/tests/test-backout.t
@@ -81,8 +81,10 @@
   [1]
   $ hg summary
   parent: 4:ed99997b793d tip
+  merging: local
    ypples
   source: 1:22cb4f70d813 
+  merging: other
    chair
   branch: default
   commit: 1 unresolved (clean)
@@ -706,8 +708,10 @@
   U foo
   $ hg summary
   parent: 2:b71750c4b0fd tip
+  merging: local
    capital ten
   source: 0:a30dd8addae3 
+  merging: other
    initial
   branch: default
   commit: 1 unresolved (clean)
@@ -727,8 +731,10 @@
   R foo
   $ hg summary
   parent: 2:b71750c4b0fd tip
+  merging: local
    capital ten
   source: 0:a30dd8addae3 
+  merging: other
    initial
   branch: default
   commit: 1 modified, 1 unknown
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
@@ -471,8 +471,10 @@
 
   $ hg summary
   parent: 1:56daeba07f4b 
+  merging: local
    c2
   parent: 2:e4e3f3546619 tip
+  merging: other
    c2b
   branch: default
   commit: 1 modified, 1 unresolved (merge)
diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -865,8 +865,10 @@
   ? foo/foo
   $ hg summary
   parent: 4:33f7f61e6c5e tip
+  merging: local
    create conflict
   source: -1:000000000000  (no associated revision)
+  merging: other
   branch: default
   bookmarks: *test
   commit: 2 unknown (clean)
diff --git a/tests/test-strip.t b/tests/test-strip.t
--- a/tests/test-strip.t
+++ b/tests/test-strip.t
@@ -490,8 +490,10 @@
   [1]
   $ hg sum
   parent: 1:76dcf9fab855 tip
+  merging: other
    b
   source: 0:9ab35a2d17cb 
+  merging: local
    a
   branch: default
   commit: 1 modified, 1 unknown, 1 unresolved


More information about the Mercurial-devel mailing list