# HG changeset patch # User Martin Geisler # Date 1258204913 -3600 # Node ID 24bc6e414610d0e5cffb8eeff2991af29c60ea56 # Parent ed362d41d1f636a2029e53dfb0fb28ff8a154d86 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. diff -r ed362d41d1f6 -r 24bc6e414610 hgext/mq.py --- a/hgext/mq.py Mon Nov 09 17:41:21 2009 +0100 +++ b/hgext/mq.py Sat Nov 14 14:21:53 2009 +0100 @@ -1129,7 +1129,7 @@ self.ui.write(_("no patches applied\n")) return qp = self.qparents(repo, top) - if opts.get('inverse'): + if opts.get('reverse'): node1, node2 = None, qp else: node1, node2 = qp, None diff -r ed362d41d1f6 -r 24bc6e414610 mercurial/commands.py --- 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, diff -r ed362d41d1f6 -r 24bc6e414610 tests/test-debugcomplete.out --- a/tests/test-debugcomplete.out Mon Nov 09 17:41:21 2009 +0100 +++ b/tests/test-debugcomplete.out Sat Nov 14 14:21:53 2009 +0100 @@ -167,7 +167,7 @@ annotate: rev, follow, text, user, date, number, changeset, line-number, include, exclude clone: noupdate, updaterev, rev, pull, uncompressed, ssh, remotecmd commit: addremove, close-branch, include, exclude, message, logfile, date, user -diff: rev, change, text, git, nodates, show-function, inverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude +diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude export: output, switch-parent, text, git, nodates forget: include, exclude init: ssh, remotecmd diff -r ed362d41d1f6 -r 24bc6e414610 tests/test-diff-inverse --- a/tests/test-diff-inverse Mon Nov 09 17:41:21 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -#!/bin/sh - -hg init -cat > a < a <> a < a < a <> a <