changeset 29723:91b2f2176395

extdiff: isolate path variable of saved command to independent paragraph Otherwise, the whole paragraph wouldn't be translated.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 27 Jul 2016 21:44:49 +0900
parents 14c3afcb1c26
children 4e7be6e33269
files hgext/extdiff.py tests/test-extdiff.t
diffstat 2 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/extdiff.py	Wed Jul 27 21:42:24 2016 +0900
+++ b/hgext/extdiff.py	Wed Jul 27 21:44:49 2016 +0900
@@ -325,10 +325,12 @@
     return dodiff(ui, repo, cmdline, pats, opts)
 
 class savedcmd(object):
-    """use %(path)s to diff repository (or selected files)
+    """use external program to diff repository (or selected files)
 
     Show differences between revisions for the specified files, using
-    the %(path)s program.
+    the following program::
+
+        %(path)s
 
     When two revision arguments are given, then changes are shown
     between those revisions. If only one revision is specified then
--- a/tests/test-extdiff.t	Wed Jul 27 21:42:24 2016 +0900
+++ b/tests/test-extdiff.t	Wed Jul 27 21:44:49 2016 +0900
@@ -31,10 +31,12 @@
   $ hg help falabala
   hg falabala [OPTION]... [FILE]...
   
-  use 'echo' to diff repository (or selected files)
+  use external program to diff repository (or selected files)
   
       Show differences between revisions for the specified files, using the
-      'echo' program.
+      following program:
+  
+        'echo'
   
       When two revision arguments are given, then changes are shown between
       those revisions. If only one revision is specified then that revision is
@@ -407,5 +409,6 @@
   (try "hg help" for a list of topics)
   [255]
 
-  $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td | grep "^use"
-  use '\xa5\xa5' to diff repository (or selected files)
+  $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \
+  > | grep "^      '"
+        '\xa5\xa5'