Patchwork [7,of,7] diff: explicitly honor all diffopts

login
register
mail settings
Submitter Siddharth Agarwal
Date Dec. 2, 2014, 6:30 p.m.
Message ID <5df493747317f59f7dd5.1417545018@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/6954/
State Accepted
Commit 9cdf9521d6dd5ea6646e2f754aff046a9a785e14
Headers show

Comments

Siddharth Agarwal - Dec. 2, 2014, 6:30 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1416377885 28800
#      Tue Nov 18 22:18:05 2014 -0800
# Node ID 5df493747317f59f7dd583e4fb1a769d4ea5aa3a
# Parent  59ce174f5a6af8ed82baa4f7da0ede3329547c1d
diff: explicitly honor all diffopts

'hg diff' should naturally honor all diffopts.
Augie Fackler - Dec. 2, 2014, 8:50 p.m.
On Tue, Dec 02, 2014 at 10:30:18AM -0800, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1416377885 28800
> #      Tue Nov 18 22:18:05 2014 -0800
> # Node ID 5df493747317f59f7dd583e4fb1a769d4ea5aa3a
> # Parent  59ce174f5a6af8ed82baa4f7da0ede3329547c1d
> diff: explicitly honor all diffopts

LGTM, queued

>
> 'hg diff' should naturally honor all diffopts.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -3073,7 +3073,7 @@
>      if reverse:
>          node1, node2 = node2, node1
>
> -    diffopts = patch.diffopts(ui, opts)
> +    diffopts = patch.diffallopts(ui, opts)
>      m = scmutil.match(repo[node2], pats, opts)
>      cmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat,
>                             listsubrepos=opts.get('subrepos'))
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3073,7 +3073,7 @@ 
     if reverse:
         node1, node2 = node2, node1
 
-    diffopts = patch.diffopts(ui, opts)
+    diffopts = patch.diffallopts(ui, opts)
     m = scmutil.match(repo[node2], pats, opts)
     cmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat,
                            listsubrepos=opts.get('subrepos'))