comparison tests/test-diff-unified.t @ 23298:dc4d0c7b7d94

diff: add a --noprefix option See previous patch descriptions for the motivation. The tests reflect the current state of the world -- as we add support we'll see changes in the test output.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 13 Nov 2014 00:13:48 -0800
parents d7abae94a7a0
children 1f510efcd5f3
comparison
equal deleted inserted replaced
23297:d7abae94a7a0 23298:dc4d0c7b7d94
87 87
88 $ hg --config diff.unified=foo diff --nodates 88 $ hg --config diff.unified=foo diff --nodates
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
96 --- a/a 96 --- a/a
97 +++ b/a 97 +++ b/a
102 -b 102 -b
103 +dd 103 +dd
104 a 104 a
105 a 105 a
106 c 106 c
107 107 $ hg diff --noprefix --nodates
108 noprefix disabled in plain mode 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
120
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
124 diff -r cf9f4ba66af2 a
125 --- a/a
126 +++ b/a
127 @@ -2,7 +2,7 @@
128 c
129 a
130 a
131 -b
132 +dd
133 a
134 a
135 c
136 $ HGPLAIN=1 hg diff --noprefix --nodates
111 diff -r cf9f4ba66af2 a 137 diff -r cf9f4ba66af2 a
112 --- a/a 138 --- a/a
113 +++ b/a 139 +++ b/a
114 @@ -2,7 +2,7 @@ 140 @@ -2,7 +2,7 @@
115 c 141 c
213 +++ b/f 1 239 +++ b/f 1
214 @@ -1,1 +1,1 @@ 240 @@ -1,1 +1,1 @@
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
247 diff --git a/f1 b/f 1
248 rename from f1
249 rename to f 1
250 --- a/f1
251 +++ b/f 1
252 @@ -1,1 +1,1 @@
253 -a
254 +b
255 $ HGPLAIN=1 hg diff --git --noprefix --nodates
221 diff --git a/f1 b/f 1 256 diff --git a/f1 b/f 1
222 rename from f1 257 rename from f1
223 rename to f 1 258 rename to f 1
224 --- a/f1 259 --- a/f1
225 +++ b/f 1 260 +++ b/f 1