##// END OF EJS Templates
diff: add a --noprefix option...
Siddharth Agarwal -
r23298:dc4d0c7b default
parent child Browse files
Show More
@@ -141,6 +141,7 b' diffwsopts = ['
141 ]
141 ]
142
142
143 diffopts2 = [
143 diffopts2 = [
144 ('', 'noprefix', None, _('omit a/ and b/ prefixes from filenames')),
144 ('p', 'show-function', None, _('show which function each change is in')),
145 ('p', 'show-function', None, _('show which function each change is in')),
145 ('', 'reverse', None, _('produce a diff that undoes the changes')),
146 ('', 'reverse', None, _('produce a diff that undoes the changes')),
146 ] + diffwsopts + [
147 ] + diffwsopts + [
@@ -202,7 +202,7 b' Show all commands + options'
202 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, ignore-all-space, ignore-space-change, ignore-blank-lines, include, exclude, template
202 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, ignore-all-space, ignore-space-change, ignore-blank-lines, include, exclude, template
203 clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
203 clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
204 commit: addremove, close-branch, amend, secret, edit, include, exclude, message, logfile, date, user, subrepos
204 commit: addremove, close-branch, amend, secret, edit, include, exclude, message, logfile, date, user, subrepos
205 diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude, subrepos
205 diff: rev, change, text, git, nodates, noprefix, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude, subrepos
206 export: output, switch-parent, rev, text, git, nodates
206 export: output, switch-parent, rev, text, git, nodates
207 forget: include, exclude
207 forget: include, exclude
208 init: ssh, remotecmd, insecure
208 init: ssh, remotecmd, insecure
@@ -89,7 +89,7 b' invalid diff.unified'
89 abort: diff context lines count must be an integer, not 'foo'
89 abort: diff context lines count must be an integer, not 'foo'
90 [255]
90 [255]
91
91
92 noprefix config
92 noprefix config and option
93
93
94 $ hg --config diff.noprefix=True diff --nodates
94 $ hg --config diff.noprefix=True diff --nodates
95 diff -r cf9f4ba66af2 a
95 diff -r cf9f4ba66af2 a
@@ -104,8 +104,21 b' noprefix config'
104 a
104 a
105 a
105 a
106 c
106 c
107 $ hg diff --noprefix --nodates
108 diff -r cf9f4ba66af2 a
109 --- a/a
110 +++ b/a
111 @@ -2,7 +2,7 @@
112 c
113 a
114 a
115 -b
116 +dd
117 a
118 a
119 c
107
120
108 noprefix disabled in plain mode
121 noprefix config disabled in plain mode, but option still enabled
109
122
110 $ HGPLAIN=1 hg --config diff.noprefix=True diff --nodates
123 $ HGPLAIN=1 hg --config diff.noprefix=True diff --nodates
111 diff -r cf9f4ba66af2 a
124 diff -r cf9f4ba66af2 a
@@ -120,6 +133,19 b' noprefix disabled in plain mode'
120 a
133 a
121 a
134 a
122 c
135 c
136 $ HGPLAIN=1 hg diff --noprefix --nodates
137 diff -r cf9f4ba66af2 a
138 --- a/a
139 +++ b/a
140 @@ -2,7 +2,7 @@
141 c
142 a
143 a
144 -b
145 +dd
146 a
147 a
148 c
123
149
124 $ cd ..
150 $ cd ..
125
151
@@ -215,7 +241,7 b' Git diff with noprefix'
215 -a
241 -a
216 +b
242 +b
217
243
218 noprefix config disabled in plain mode
244 noprefix config disabled in plain mode, but option still enabled
219
245
220 $ HGPLAIN=1 hg --config diff.noprefix=True diff --git --nodates
246 $ HGPLAIN=1 hg --config diff.noprefix=True diff --git --nodates
221 diff --git a/f1 b/f 1
247 diff --git a/f1 b/f 1
@@ -226,6 +252,15 b' noprefix config disabled in plain mode'
226 @@ -1,1 +1,1 @@
252 @@ -1,1 +1,1 @@
227 -a
253 -a
228 +b
254 +b
255 $ HGPLAIN=1 hg diff --git --noprefix --nodates
256 diff --git a/f1 b/f 1
257 rename from f1
258 rename to f 1
259 --- a/f1
260 +++ b/f 1
261 @@ -1,1 +1,1 @@
262 -a
263 +b
229
264
230 Regular diff --nodates, file deletion
265 Regular diff --nodates, file deletion
231
266
@@ -500,6 +500,7 b' Test command without options'
500 -a --text treat all files as text
500 -a --text treat all files as text
501 -g --git use git extended diff format
501 -g --git use git extended diff format
502 --nodates omit dates from diff headers
502 --nodates omit dates from diff headers
503 --noprefix omit a/ and b/ prefixes from filenames
503 -p --show-function show which function each change is in
504 -p --show-function show which function each change is in
504 --reverse produce a diff that undoes the changes
505 --reverse produce a diff that undoes the changes
505 -w --ignore-all-space ignore white space when comparing lines
506 -w --ignore-all-space ignore white space when comparing lines
General Comments 0
You need to be logged in to leave comments. Login now