Patchwork [2,of,4] export: explicitly honor all diffopts

login
register
mail settings
Submitter Siddharth Agarwal
Date Dec. 29, 2014, 11:57 p.m.
Message ID <d6c626f1b24ef6bcdd7f.1419897434@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/7256/
State Accepted
Commit de5c76aaeaf4b30d5a1f78a604b192a6d7619228
Headers show

Comments

Siddharth Agarwal - Dec. 29, 2014, 11:57 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1416378063 28800
#      Tue Nov 18 22:21:03 2014 -0800
# Node ID d6c626f1b24ef6bcdd7fa5fc081ca87b488449df
# Parent  76830247377d500779cb94b0c0da569d2ddb3a07
export: explicitly honor all diffopts

This is slightly more controversial than diff, but we hope that HGPLAIN=1
covers all the format-breaking ones.

A possible alternative here that breaks BC is to honor all opts except the
whitespace ones.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3169,7 +3169,7 @@ 
         ui.note(_('exporting patch:\n'))
     cmdutil.export(repo, revs, template=opts.get('output'),
                  switch_parent=opts.get('switch_parent'),
-                 opts=patch.diffopts(ui, opts))
+                 opts=patch.diffallopts(ui, opts))
 
 @command('files',
     [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')),