changeset 36264:18e29c65bc5c

remotenames: don't use the default value of logfmt for namespaces logfmt is the format which is used to format the log output for that namespace. This patch passes "remote {bookmark|branch}: %s" as the logfmt. Space is not added after bookmark and branch to make output consistent with other details. Still this is not the best output. We may need to wrap getlogcolumns() to change spacing in the in built columns to match the remotenames one. lognames are also deleted as they are superseded by logfmt. Differential Revision: https://phab.mercurial-scm.org/D2277
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 15 Feb 2018 17:14:45 +0530
parents d3fa5e106e65
children b44fac3a49fb
files hgext/remotenames.py tests/test-logexchange.t
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/remotenames.py	Sat Feb 17 01:41:08 2018 -0500
+++ b/hgext/remotenames.py	Thu Feb 15 17:14:45 2018 +0530
@@ -204,8 +204,8 @@
         remotebookmarkns = ns(
             'remotebookmarks',
             templatename='remotebookmarks',
-            logname='remote bookmark',
             colorname='remotebookmark',
+            logfmt='remote bookmark:  %s\n',
             listnames=lambda repo: repo._remotenames.bmarktonodes().keys(),
             namemap=lambda repo, name:
                 repo._remotenames.bmarktonodes().get(name, []),
@@ -217,8 +217,8 @@
         remotebranchns = ns(
             'remotebranches',
             templatename='remotebranches',
-            logname='remote branch',
             colorname='remotebranch',
+            logfmt='remote branch:  %s\n',
             listnames = lambda repo: repo._remotenames.branchtonodes().keys(),
             namemap = lambda repo, name:
                 repo._remotenames.branchtonodes().get(name, []),
--- a/tests/test-logexchange.t	Sat Feb 17 01:41:08 2018 -0500
+++ b/tests/test-logexchange.t	Thu Feb 15 17:14:45 2018 +0530
@@ -127,24 +127,24 @@
   @  changeset:   8:3e1487808078
   |  branch:      wat
   |  tag:         tip
-  |  remote branch:$TESTTMP/server2/wat
-  |  remote branch:default/wat
+  |  remote branch:  $TESTTMP/server2/wat
+  |  remote branch:  default/wat
   |  parent:      4:aa98ab95a928
   |  user:        test
   |  date:        Thu Jan 01 00:00:00 1970 +0000
   |  summary:     added bar
   |
   | o  changeset:   7:ec2426147f0e
-  | |  remote branch:$TESTTMP/server2/default
-  | |  remote branch:default/default
+  | |  remote branch:  $TESTTMP/server2/default
+  | |  remote branch:  default/default
   | |  user:        test
   | |  date:        Thu Jan 01 00:00:00 1970 +0000
   | |  summary:     Added h
   | |
   | o  changeset:   6:87d6d6676308
   | |  bookmark:    bar
-  | |  remote bookmark:$TESTTMP/server2/bar
-  | |  remote bookmark:default/bar
+  | |  remote bookmark:  $TESTTMP/server2/bar
+  | |  remote bookmark:  default/bar
   | |  user:        test
   | |  date:        Thu Jan 01 00:00:00 1970 +0000
   | |  summary:     Added g
@@ -161,8 +161,8 @@
   |
   o  changeset:   3:62615734edd5
   |  bookmark:    foo
-  |  remote bookmark:$TESTTMP/server2/foo
-  |  remote bookmark:default/foo
+  |  remote bookmark:  $TESTTMP/server2/foo
+  |  remote bookmark:  default/foo
   |  user:        test
   |  date:        Thu Jan 01 00:00:00 1970 +0000
   |  summary:     Added d