Patchwork [2,of,2] status: remove "morestatus" message from formatter data (BC)

login
register
mail settings
Submitter Yuya Nishihara
Date Sept. 19, 2018, 2:40 p.m.
Message ID <5b22378958797dc89355.1537368019@mimosa>
Download mbox | patch
Permalink /patch/34834/
State New
Headers show

Comments

Yuya Nishihara - Sept. 19, 2018, 2:40 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1537014936 -32400
#      Sat Sep 15 21:35:36 2018 +0900
# Node ID 5b22378958797dc89355df4cc786122ee865f617
# Parent  e65785c1812ec44e5768d79bd0fa47aaeef9d28d
status: remove "morestatus" message from formatter data (BC)

They are just printable messages, not data that should be fed to JSON or
templater.
Augie Fackler - Sept. 20, 2018, 7:52 p.m.
On Wed, Sep 19, 2018 at 11:40:19PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1537014936 -32400
> #      Sat Sep 15 21:35:36 2018 +0900
> # Node ID 5b22378958797dc89355df4cc786122ee865f617
> # Parent  e65785c1812ec44e5768d79bd0fa47aaeef9d28d
> status: remove "morestatus" message from formatter data (BC)

queued, thanks

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -654,16 +654,15 @@  def morestatus(repo, fm):
     statetuple = _getrepostate(repo)
     label = 'status.morestatus'
     if statetuple:
-        fm.startitem()
         state, statedetectionpredicate, helpfulmsg = statetuple
         statemsg = _('The repository is in an unfinished *%s* state.') % state
-        fm.write('statemsg', '%s\n',  _commentlines(statemsg), label=label)
+        fm.plain('%s\n' % _commentlines(statemsg), label=label)
         conmsg = _conflictsmsg(repo)
         if conmsg:
-            fm.write('conflictsmsg', '%s\n', conmsg, label=label)
+            fm.plain('%s\n' % conmsg, label=label)
         if helpfulmsg:
             helpmsg = helpfulmsg()
-            fm.write('helpmsg', '%s\n', helpmsg, label=label)
+            fm.plain('%s\n' % helpmsg, label=label)
 
 def findpossible(cmd, table, strict=False):
     """
diff --git a/tests/test-conflict.t b/tests/test-conflict.t
--- a/tests/test-conflict.t
+++ b/tests/test-conflict.t
@@ -69,11 +69,6 @@ 
    {
     "path": "a.orig",
     "status": "?"
-   },
-   {
-    "conflictsmsg": "# Unresolved merge conflicts:\n# \n#     a\n# \n# To mark files as resolved:  hg resolve --mark FILE\n",
-    "helpmsg": "# To continue:    hg commit\n# To abort:       hg merge --abort\n",
-    "statemsg": "# The repository is in an unfinished *merge* state.\n"
    }
   ]