extdiff: respect --option in command aliases (issue949) stable
authorSune Foldager <cryo@cyanite.org>
Mon, 30 Nov 2009 19:37:38 +0100
branchstable
changeset 9956 6045a8c4dbbc
parent 9954 d6a307719ccb
child 9957 ad44e1f8b3f3
child 9966 1fa9f6850dee
extdiff: respect --option in command aliases (issue949)
hgext/extdiff.py
tests/test-extdiff
tests/test-extdiff.out
--- a/hgext/extdiff.py	Mon Nov 30 14:58:52 2009 +0100
+++ b/hgext/extdiff.py	Mon Nov 30 19:37:38 2009 +0100
@@ -253,7 +253,8 @@
         def save(cmd, path, diffopts):
             '''use closure to save diff command to use'''
             def mydiff(ui, repo, *pats, **opts):
-                return dodiff(ui, repo, path, diffopts, pats, opts)
+                return dodiff(ui, repo, path, diffopts + opts['option'],
+                              pats, opts)
             doc = _('''\
 use %(path)s to diff repository (or selected files)
 
--- a/tests/test-extdiff	Mon Nov 30 14:58:52 2009 +0100
+++ b/tests/test-extdiff	Mon Nov 30 19:37:38 2009 +0100
@@ -65,3 +65,9 @@
 hg extdiff -p `pwd`/differ.py # will change to /tmp/extdiff.TMP and populate directories a.TMP and a and start tool
 echo '% diff in working directory, after'
 hg diff --git
+
+echo
+echo % test extdiff with --option
+hg extdiff -p echo -o this -c 1
+hg falabala -o this -c 1
+echo
--- a/tests/test-extdiff.out	Mon Nov 30 14:58:52 2009 +0100
+++ b/tests/test-extdiff.out	Mon Nov 30 19:37:38 2009 +0100
@@ -68,3 +68,8 @@
 -b
 +changed
 +edited
+
+% test extdiff with --option
+this a.8a5febb7f867/a a.34eed99112ab/a
+diffing this a.8a5febb7f867/a a.34eed99112ab/a
+