Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 9857:24bc6e414610
diff: change --inverse to --reverse
This fixes an incompatibility with patch(1), which also uses --reverse
for reversed diffs. The --inverse flag was added in 3f522d2fa633. That
name was chosen over --reverse since it was thought that --reverse
would make --rev ambiguous.
It turns out that both flags can co-exist, with the cost that --rev
can no longer be shortened to --r and --re. Since one can always use
the short -r option, this is not a real problem.
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Sat, 14 Nov 2009 14:21:53 +0100 |
parents | 0a3fc37261ab |
children | 541218fbad2a |
line wrap: on
line diff
--- a/mercurial/commands.py Mon Nov 09 17:41:21 2009 +0100 +++ b/mercurial/commands.py Sat Nov 14 14:21:53 2009 +0100 @@ -1099,7 +1099,7 @@ revs = opts.get('rev') change = opts.get('change') stat = opts.get('stat') - inv = opts.get('inverse') + reverse = opts.get('reverse') if revs and change: msg = _('cannot specify --rev and --change at the same time') @@ -1110,7 +1110,7 @@ else: node1, node2 = cmdutil.revpair(repo, revs) - if inv: + if reverse: node1, node2 = node2, node1 if stat: @@ -3284,7 +3284,7 @@ diffopts2 = [ ('p', 'show-function', None, _('show which function each change is in')), - ('', 'inverse', None, _('produce a diff that undoes the changes')), + ('', 'reverse', None, _('produce a diff that undoes the changes')), ('w', 'ignore-all-space', None, _('ignore white space when comparing lines')), ('b', 'ignore-space-change', None,