Show More
@@ -1129,7 +1129,7 b' class queue(object):' | |||||
1129 | self.ui.write(_("no patches applied\n")) |
|
1129 | self.ui.write(_("no patches applied\n")) | |
1130 | return |
|
1130 | return | |
1131 | qp = self.qparents(repo, top) |
|
1131 | qp = self.qparents(repo, top) | |
1132 |
if opts.get(' |
|
1132 | if opts.get('reverse'): | |
1133 | node1, node2 = None, qp |
|
1133 | node1, node2 = None, qp | |
1134 | else: |
|
1134 | else: | |
1135 | node1, node2 = qp, None |
|
1135 | node1, node2 = qp, None |
@@ -1099,7 +1099,7 b' def diff(ui, repo, *pats, **opts):' | |||||
1099 | revs = opts.get('rev') |
|
1099 | revs = opts.get('rev') | |
1100 | change = opts.get('change') |
|
1100 | change = opts.get('change') | |
1101 | stat = opts.get('stat') |
|
1101 | stat = opts.get('stat') | |
1102 |
|
|
1102 | reverse = opts.get('reverse') | |
1103 |
|
1103 | |||
1104 | if revs and change: |
|
1104 | if revs and change: | |
1105 | msg = _('cannot specify --rev and --change at the same time') |
|
1105 | msg = _('cannot specify --rev and --change at the same time') | |
@@ -1110,7 +1110,7 b' def diff(ui, repo, *pats, **opts):' | |||||
1110 | else: |
|
1110 | else: | |
1111 | node1, node2 = cmdutil.revpair(repo, revs) |
|
1111 | node1, node2 = cmdutil.revpair(repo, revs) | |
1112 |
|
1112 | |||
1113 |
if |
|
1113 | if reverse: | |
1114 | node1, node2 = node2, node1 |
|
1114 | node1, node2 = node2, node1 | |
1115 |
|
1115 | |||
1116 | if stat: |
|
1116 | if stat: | |
@@ -3284,7 +3284,7 b' diffopts = [' | |||||
3284 |
|
3284 | |||
3285 | diffopts2 = [ |
|
3285 | diffopts2 = [ | |
3286 | ('p', 'show-function', None, _('show which function each change is in')), |
|
3286 | ('p', 'show-function', None, _('show which function each change is in')), | |
3287 |
('', ' |
|
3287 | ('', 'reverse', None, _('produce a diff that undoes the changes')), | |
3288 | ('w', 'ignore-all-space', None, |
|
3288 | ('w', 'ignore-all-space', None, | |
3289 | _('ignore white space when comparing lines')), |
|
3289 | _('ignore white space when comparing lines')), | |
3290 | ('b', 'ignore-space-change', None, |
|
3290 | ('b', 'ignore-space-change', None, |
@@ -167,7 +167,7 b' add: include, exclude, dry-run' | |||||
167 | annotate: rev, follow, text, user, date, number, changeset, line-number, include, exclude |
|
167 | annotate: rev, follow, text, user, date, number, changeset, line-number, include, exclude | |
168 | clone: noupdate, updaterev, rev, pull, uncompressed, ssh, remotecmd |
|
168 | clone: noupdate, updaterev, rev, pull, uncompressed, ssh, remotecmd | |
169 | commit: addremove, close-branch, include, exclude, message, logfile, date, user |
|
169 | commit: addremove, close-branch, include, exclude, message, logfile, date, user | |
170 |
diff: rev, change, text, git, nodates, show-function, |
|
170 | diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude | |
171 | export: output, switch-parent, text, git, nodates |
|
171 | export: output, switch-parent, text, git, nodates | |
172 | forget: include, exclude |
|
172 | forget: include, exclude | |
173 | init: ssh, remotecmd |
|
173 | init: ssh, remotecmd |
@@ -15,10 +15,10 b' f' | |||||
15 | EOF |
|
15 | EOF | |
16 | hg ci -m moda |
|
16 | hg ci -m moda | |
17 |
|
17 | |||
18 |
hg diff -- |
|
18 | hg diff --reverse -r0 -r1 | |
19 |
|
19 | |||
20 | cat >> a <<EOF |
|
20 | cat >> a <<EOF | |
21 | g |
|
21 | g | |
22 | h |
|
22 | h | |
23 | EOF |
|
23 | EOF | |
24 |
hg diff -- |
|
24 | hg diff --reverse --nodates |
1 | NO CONTENT: file renamed from tests/test-diff-inverse.out to tests/test-diff-reverse.out |
|
NO CONTENT: file renamed from tests/test-diff-inverse.out to tests/test-diff-reverse.out |
@@ -239,7 +239,7 b' options:' | |||||
239 | -g --git use git extended diff format |
|
239 | -g --git use git extended diff format | |
240 | --nodates don't include dates in diff headers |
|
240 | --nodates don't include dates in diff headers | |
241 | -p --show-function show which function each change is in |
|
241 | -p --show-function show which function each change is in | |
242 |
-- |
|
242 | --reverse produce a diff that undoes the changes | |
243 | -w --ignore-all-space ignore white space when comparing lines |
|
243 | -w --ignore-all-space ignore white space when comparing lines | |
244 | -b --ignore-space-change ignore changes in the amount of white space |
|
244 | -b --ignore-space-change ignore changes in the amount of white space | |
245 | -B --ignore-blank-lines ignore changes whose lines are all blank |
|
245 | -B --ignore-blank-lines ignore changes whose lines are all blank |
General Comments 0
You need to be logged in to leave comments.
Login now