[PATCH 2 of 4] export: explicitly honor all diffopts

Siddharth Agarwal sid0 at fb.com
Mon Dec 29 17:57:14 CST 2014


# HG changeset patch
# User Siddharth Agarwal <sid0 at 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.

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')),


More information about the Mercurial-devel mailing list