Patchwork D9007: graphlog: use '%' only if there are *unresolved* conflicts

login
register
mail settings
Submitter phabricator
Date Sept. 10, 2020, 8:13 p.m.
Message ID <differential-rev-PHID-DREV-otpyve2l5wtrox5ge32u-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/47127/
State Superseded
Headers show

Comments

phabricator - Sept. 10, 2020, 8:13 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In 14d0e89520a2 <https://phab.mercurial-scm.org/rHG14d0e89520a265e909711d8d184e1efa8791f140>, I made graphlog use '%' for the "other" context when
  there's an existing merge state. However, that has confused many
  people because it shows up even if all conflicts are already resolved,
  which makes it show up even after e.g. `hg update -m` with
  automatically resolved conflicts. This patch makes it so we show the
  '%' only if there still unresolved conflicts.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9007

AFFECTED FILES
  mercurial/templatekw.py
  tests/test-graft-interrupted.t
  tests/test-rebase-collapse.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

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
@@ -762,7 +762,7 @@ 
   abort: edit failed: false exited with status 1
   [255]
   $ hg tglog
-  %  3: 63668d570d21 'C'
+  o  3: 63668d570d21 'C'
   |
   | @  2: 82b8abf9c185 'D'
   | |
diff --git a/tests/test-graft-interrupted.t b/tests/test-graft-interrupted.t
--- a/tests/test-graft-interrupted.t
+++ b/tests/test-graft-interrupted.t
@@ -622,7 +622,7 @@ 
   $ hg log -GT "{rev}:{node|short} {desc}\n"
   @  4:2aa9ad1006ff B in file a
   |
-  | %  3:09e253b87e17 A in file a
+  | o  3:09e253b87e17 A in file a
   | |
   | o  2:d36c0562f908 c
   | |
@@ -669,7 +669,7 @@ 
   $ hg log -GT "{rev}:{node|short} {desc}\n"
   @  4:2aa9ad1006ff B in file a
   |
-  | %  3:09e253b87e17 A in file a
+  | o  3:09e253b87e17 A in file a
   | |
   | o  2:d36c0562f908 c
   | |
@@ -712,7 +712,7 @@ 
   $ hg log -GT "{rev}:{node|short} {desc}\n"
   @  4:2aa9ad1006ff B in file a
   |
-  | %  3:09e253b87e17 A in file a
+  | o  3:09e253b87e17 A in file a
   | |
   | o  2:d36c0562f908 c
   | |
diff --git a/mercurial/templatekw.py b/mercurial/templatekw.py
--- a/mercurial/templatekw.py
+++ b/mercurial/templatekw.py
@@ -422,7 +422,7 @@ 
             from . import mergestate as mergestatemod
 
             mergestate = mergestatemod.mergestate.read(repo)
-            if mergestate.active():
+            if mergestate.unresolvedcount():
                 merge_nodes = (mergestate.local, mergestate.other)
             else:
                 merge_nodes = ()