Patchwork [4,of,4] extdiff: isolate path variable of saved command to independent paragraph

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 6, 2016, 4:50 a.m.
Message ID <56e9357be6b270467833.1470459015@mimosa>
Download mbox | patch
Permalink /patch/16151/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 6, 2016, 4:50 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1469623489 -32400
#      Wed Jul 27 21:44:49 2016 +0900
# Node ID 56e9357be6b2704678331999e8b4b02777fc724b
# Parent  99a275727f2eb0a69dd9dcd322584b824a5a22af
extdiff: isolate path variable of saved command to independent paragraph

Otherwise, the whole paragraph wouldn't be translated.
Pierre-Yves David - Aug. 6, 2016, 1:37 p.m.
On 08/06/2016 06:50 AM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1469623489 -32400
> #      Wed Jul 27 21:44:49 2016 +0900
> # Node ID 56e9357be6b2704678331999e8b4b02777fc724b
> # Parent  99a275727f2eb0a69dd9dcd322584b824a5a22af
> extdiff: isolate path variable of saved command to independent paragraph

Pushed, thanks.

Patch

diff --git a/hgext/extdiff.py b/hgext/extdiff.py
--- a/hgext/extdiff.py
+++ b/hgext/extdiff.py
@@ -325,10 +325,12 @@  def extdiff(ui, repo, *pats, **opts):
     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
diff --git a/tests/test-extdiff.t b/tests/test-extdiff.t
--- a/tests/test-extdiff.t
+++ b/tests/test-extdiff.t
@@ -31,10 +31,12 @@  Should diff cloned directories:
   $ 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 @@  Test handling of non-ASCII paths in gene
   (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'