Show More
@@ -1,788 +1,788 b'' | |||
|
1 | 1 | #require serve |
|
2 | 2 | |
|
3 | 3 | Create a repo with whitespace only changes |
|
4 | 4 | |
|
5 | 5 | $ hg init repo-with-whitespace |
|
6 | 6 | $ cd repo-with-whitespace |
|
7 | 7 | $ cat > foo << EOF |
|
8 | 8 | > line 0 |
|
9 | 9 | > line 1 |
|
10 | 10 | > line 2 |
|
11 | 11 | > line 3 |
|
12 | 12 | > EOF |
|
13 | 13 | $ hg -q commit -A -m 'commit 0' |
|
14 | 14 | $ cat > foo << EOF |
|
15 | 15 | > line 0 |
|
16 | 16 | > line 1 modified by 1 |
|
17 | 17 | > line 2 |
|
18 | 18 | > line 3 |
|
19 | 19 | > EOF |
|
20 | 20 | $ hg commit -m 'commit 1' |
|
21 | 21 | $ cat > foo << EOF |
|
22 | 22 | > line 0 |
|
23 | 23 | > line 1 modified by 1 |
|
24 | 24 | > line 2 |
|
25 | 25 | > line 3 |
|
26 | 26 | > EOF |
|
27 | 27 | $ hg commit -m 'commit 2 (leading whitespace on line 2)' |
|
28 | 28 | $ cat > foo << EOF |
|
29 | 29 | > line 0 |
|
30 | 30 | > line 1 modified by 1 |
|
31 | 31 | > line 2 |
|
32 | 32 | > EOF |
|
33 | 33 | Need to use printf to avoid check-code complaining about trailing whitespace. |
|
34 | 34 | $ printf 'line 3 \n' >> foo |
|
35 | 35 | $ hg commit -m 'commit 3 (trailing whitespace on line 3)' |
|
36 | 36 | $ cat > foo << EOF |
|
37 | 37 | > line 0 |
|
38 | 38 | > line 1 modified by 1 |
|
39 | 39 | > line 2 |
|
40 | 40 | > EOF |
|
41 | 41 | $ printf 'line 3 \n' >> foo |
|
42 | 42 | $ hg commit -m 'commit 4 (intra whitespace on line 0)' |
|
43 | 43 | $ cat > foo << EOF |
|
44 | 44 | > line 0 |
|
45 | 45 | > |
|
46 | 46 | > line 1 modified by 1 |
|
47 | 47 | > line 2 |
|
48 | 48 | > EOF |
|
49 | 49 | $ printf 'line 3 \n' >> foo |
|
50 | 50 | $ hg commit -m 'commit 5 (add blank line between line 0 and 1)' |
|
51 | 51 | $ cat > foo << EOF |
|
52 | 52 | > line 0 |
|
53 | 53 | > |
|
54 | 54 | > |
|
55 | 55 | > line 1 modified by 1 |
|
56 | 56 | > line 2 |
|
57 | 57 | > EOF |
|
58 | 58 | $ printf 'line 3 \n' >> foo |
|
59 | 59 | $ hg commit -m 'commit 6 (add another blank line between line 0 and 1)' |
|
60 | 60 | |
|
61 | 61 | $ hg log -G -T '{rev}:{node|short} {desc}' |
|
62 | 62 | @ 6:9d1b2c7db017 commit 6 (add another blank line between line 0 and 1) |
|
63 | 63 | | |
|
64 | 64 | o 5:400ef1d40470 commit 5 (add blank line between line 0 and 1) |
|
65 | 65 | | |
|
66 | 66 | o 4:08adbe269f24 commit 4 (intra whitespace on line 0) |
|
67 | 67 | | |
|
68 | 68 | o 3:dcb62cfbfc9b commit 3 (trailing whitespace on line 3) |
|
69 | 69 | | |
|
70 | 70 | o 2:6bdb694e7b8c commit 2 (leading whitespace on line 2) |
|
71 | 71 | | |
|
72 | 72 | o 1:23e1e37387dc commit 1 |
|
73 | 73 | | |
|
74 | 74 | o 0:b9c578134d72 commit 0 |
|
75 | 75 | |
|
76 | 76 | |
|
77 | 77 | $ hg serve -p $HGPORT -d --pid-file hg.pid |
|
78 | 78 | $ cat hg.pid >> $DAEMON_PIDS |
|
79 |
$ hg --config annotate.ignorews=true |
|
|
79 | $ hg serve --config annotate.ignorews=true -p $HGPORT1 -d --pid-file hg.pid | |
|
80 | 80 | $ cat hg.pid >> $DAEMON_PIDS |
|
81 | 81 | $ cd .. |
|
82 | 82 | |
|
83 | 83 | Annotate works |
|
84 | 84 | |
|
85 | 85 | $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo' |
|
86 | 86 | 200 Script output follows |
|
87 | 87 | |
|
88 | 88 | { |
|
89 | 89 | "abspath": "foo", |
|
90 | 90 | "annotate": [ |
|
91 | 91 | { |
|
92 | 92 | "abspath": "foo", |
|
93 | 93 | "author": "test", |
|
94 | 94 | "desc": "commit 4 (intra whitespace on line 0)", |
|
95 | 95 | "line": "line 0\n", |
|
96 | 96 | "lineno": 1, |
|
97 | 97 | "node": "08adbe269f24cf22d975eadeec16790c5b22f558", |
|
98 | 98 | "revdate": [ |
|
99 | 99 | 0.0, |
|
100 | 100 | 0 |
|
101 | 101 | ], |
|
102 | 102 | "targetline": 1 |
|
103 | 103 | }, |
|
104 | 104 | { |
|
105 | 105 | "abspath": "foo", |
|
106 | 106 | "author": "test", |
|
107 | 107 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
108 | 108 | "line": "\n", |
|
109 | 109 | "lineno": 2, |
|
110 | 110 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
111 | 111 | "revdate": [ |
|
112 | 112 | 0.0, |
|
113 | 113 | 0 |
|
114 | 114 | ], |
|
115 | 115 | "targetline": 2 |
|
116 | 116 | }, |
|
117 | 117 | { |
|
118 | 118 | "abspath": "foo", |
|
119 | 119 | "author": "test", |
|
120 | 120 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
121 | 121 | "line": "\n", |
|
122 | 122 | "lineno": 3, |
|
123 | 123 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
124 | 124 | "revdate": [ |
|
125 | 125 | 0.0, |
|
126 | 126 | 0 |
|
127 | 127 | ], |
|
128 | 128 | "targetline": 3 |
|
129 | 129 | }, |
|
130 | 130 | { |
|
131 | 131 | "abspath": "foo", |
|
132 | 132 | "author": "test", |
|
133 | 133 | "desc": "commit 1", |
|
134 | 134 | "line": "line 1 modified by 1\n", |
|
135 | 135 | "lineno": 4, |
|
136 | 136 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
137 | 137 | "revdate": [ |
|
138 | 138 | 0.0, |
|
139 | 139 | 0 |
|
140 | 140 | ], |
|
141 | 141 | "targetline": 2 |
|
142 | 142 | }, |
|
143 | 143 | { |
|
144 | 144 | "abspath": "foo", |
|
145 | 145 | "author": "test", |
|
146 | 146 | "desc": "commit 2 (leading whitespace on line 2)", |
|
147 | 147 | "line": " line 2\n", |
|
148 | 148 | "lineno": 5, |
|
149 | 149 | "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602", |
|
150 | 150 | "revdate": [ |
|
151 | 151 | 0.0, |
|
152 | 152 | 0 |
|
153 | 153 | ], |
|
154 | 154 | "targetline": 3 |
|
155 | 155 | }, |
|
156 | 156 | { |
|
157 | 157 | "abspath": "foo", |
|
158 | 158 | "author": "test", |
|
159 | 159 | "desc": "commit 3 (trailing whitespace on line 3)", |
|
160 | 160 | "line": "line 3 \n", |
|
161 | 161 | "lineno": 6, |
|
162 | 162 | "node": "dcb62cfbfc9b3ab995a5cbbaff6e1971c3e4f865", |
|
163 | 163 | "revdate": [ |
|
164 | 164 | 0.0, |
|
165 | 165 | 0 |
|
166 | 166 | ], |
|
167 | 167 | "targetline": 4 |
|
168 | 168 | } |
|
169 | 169 | ], |
|
170 | 170 | "author": "test", |
|
171 | 171 | "children": [], |
|
172 | 172 | "date": [ |
|
173 | 173 | 0.0, |
|
174 | 174 | 0 |
|
175 | 175 | ], |
|
176 | 176 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
177 | 177 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
178 | 178 | "parents": [ |
|
179 | 179 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
180 | 180 | ], |
|
181 | 181 | "permissions": "" |
|
182 | 182 | } |
|
183 | 183 | |
|
184 | 184 | annotate.ignorews=1 config option is honored |
|
185 | 185 | |
|
186 | 186 | $ get-with-headers.py --json $LOCALIP:$HGPORT1 'json-annotate/9d1b2c7db017/foo' |
|
187 | 187 | 200 Script output follows |
|
188 | 188 | |
|
189 | 189 | { |
|
190 | 190 | "abspath": "foo", |
|
191 | 191 | "annotate": [ |
|
192 | 192 | { |
|
193 | 193 | "abspath": "foo", |
|
194 | 194 | "author": "test", |
|
195 | 195 | "desc": "commit 0", |
|
196 | 196 | "line": "line 0\n", |
|
197 | 197 | "lineno": 1, |
|
198 | 198 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
199 | 199 | "revdate": [ |
|
200 | 200 | 0.0, |
|
201 | 201 | 0 |
|
202 | 202 | ], |
|
203 | 203 | "targetline": 1 |
|
204 | 204 | }, |
|
205 | 205 | { |
|
206 | 206 | "abspath": "foo", |
|
207 | 207 | "author": "test", |
|
208 | 208 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
209 | 209 | "line": "\n", |
|
210 | 210 | "lineno": 2, |
|
211 | 211 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
212 | 212 | "revdate": [ |
|
213 | 213 | 0.0, |
|
214 | 214 | 0 |
|
215 | 215 | ], |
|
216 | 216 | "targetline": 2 |
|
217 | 217 | }, |
|
218 | 218 | { |
|
219 | 219 | "abspath": "foo", |
|
220 | 220 | "author": "test", |
|
221 | 221 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
222 | 222 | "line": "\n", |
|
223 | 223 | "lineno": 3, |
|
224 | 224 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
225 | 225 | "revdate": [ |
|
226 | 226 | 0.0, |
|
227 | 227 | 0 |
|
228 | 228 | ], |
|
229 | 229 | "targetline": 3 |
|
230 | 230 | }, |
|
231 | 231 | { |
|
232 | 232 | "abspath": "foo", |
|
233 | 233 | "author": "test", |
|
234 | 234 | "desc": "commit 1", |
|
235 | 235 | "line": "line 1 modified by 1\n", |
|
236 | 236 | "lineno": 4, |
|
237 | 237 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
238 | 238 | "revdate": [ |
|
239 | 239 | 0.0, |
|
240 | 240 | 0 |
|
241 | 241 | ], |
|
242 | 242 | "targetline": 2 |
|
243 | 243 | }, |
|
244 | 244 | { |
|
245 | 245 | "abspath": "foo", |
|
246 | 246 | "author": "test", |
|
247 | 247 | "desc": "commit 0", |
|
248 | 248 | "line": " line 2\n", |
|
249 | 249 | "lineno": 5, |
|
250 | 250 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
251 | 251 | "revdate": [ |
|
252 | 252 | 0.0, |
|
253 | 253 | 0 |
|
254 | 254 | ], |
|
255 | 255 | "targetline": 3 |
|
256 | 256 | }, |
|
257 | 257 | { |
|
258 | 258 | "abspath": "foo", |
|
259 | 259 | "author": "test", |
|
260 | 260 | "desc": "commit 0", |
|
261 | 261 | "line": "line 3 \n", |
|
262 | 262 | "lineno": 6, |
|
263 | 263 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
264 | 264 | "revdate": [ |
|
265 | 265 | 0.0, |
|
266 | 266 | 0 |
|
267 | 267 | ], |
|
268 | 268 | "targetline": 4 |
|
269 | 269 | } |
|
270 | 270 | ], |
|
271 | 271 | "author": "test", |
|
272 | 272 | "children": [], |
|
273 | 273 | "date": [ |
|
274 | 274 | 0.0, |
|
275 | 275 | 0 |
|
276 | 276 | ], |
|
277 | 277 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
278 | 278 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
279 | 279 | "parents": [ |
|
280 | 280 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
281 | 281 | ], |
|
282 | 282 | "permissions": "" |
|
283 | 283 | } |
|
284 | 284 | |
|
285 | 285 | ignorews=1 query string argument enables whitespace skipping |
|
286 | 286 | |
|
287 | 287 | $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignorews=1' |
|
288 | 288 | 200 Script output follows |
|
289 | 289 | |
|
290 | 290 | { |
|
291 | 291 | "abspath": "foo", |
|
292 | 292 | "annotate": [ |
|
293 | 293 | { |
|
294 | 294 | "abspath": "foo", |
|
295 | 295 | "author": "test", |
|
296 | 296 | "desc": "commit 0", |
|
297 | 297 | "line": "line 0\n", |
|
298 | 298 | "lineno": 1, |
|
299 | 299 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
300 | 300 | "revdate": [ |
|
301 | 301 | 0.0, |
|
302 | 302 | 0 |
|
303 | 303 | ], |
|
304 | 304 | "targetline": 1 |
|
305 | 305 | }, |
|
306 | 306 | { |
|
307 | 307 | "abspath": "foo", |
|
308 | 308 | "author": "test", |
|
309 | 309 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
310 | 310 | "line": "\n", |
|
311 | 311 | "lineno": 2, |
|
312 | 312 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
313 | 313 | "revdate": [ |
|
314 | 314 | 0.0, |
|
315 | 315 | 0 |
|
316 | 316 | ], |
|
317 | 317 | "targetline": 2 |
|
318 | 318 | }, |
|
319 | 319 | { |
|
320 | 320 | "abspath": "foo", |
|
321 | 321 | "author": "test", |
|
322 | 322 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
323 | 323 | "line": "\n", |
|
324 | 324 | "lineno": 3, |
|
325 | 325 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
326 | 326 | "revdate": [ |
|
327 | 327 | 0.0, |
|
328 | 328 | 0 |
|
329 | 329 | ], |
|
330 | 330 | "targetline": 3 |
|
331 | 331 | }, |
|
332 | 332 | { |
|
333 | 333 | "abspath": "foo", |
|
334 | 334 | "author": "test", |
|
335 | 335 | "desc": "commit 1", |
|
336 | 336 | "line": "line 1 modified by 1\n", |
|
337 | 337 | "lineno": 4, |
|
338 | 338 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
339 | 339 | "revdate": [ |
|
340 | 340 | 0.0, |
|
341 | 341 | 0 |
|
342 | 342 | ], |
|
343 | 343 | "targetline": 2 |
|
344 | 344 | }, |
|
345 | 345 | { |
|
346 | 346 | "abspath": "foo", |
|
347 | 347 | "author": "test", |
|
348 | 348 | "desc": "commit 0", |
|
349 | 349 | "line": " line 2\n", |
|
350 | 350 | "lineno": 5, |
|
351 | 351 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
352 | 352 | "revdate": [ |
|
353 | 353 | 0.0, |
|
354 | 354 | 0 |
|
355 | 355 | ], |
|
356 | 356 | "targetline": 3 |
|
357 | 357 | }, |
|
358 | 358 | { |
|
359 | 359 | "abspath": "foo", |
|
360 | 360 | "author": "test", |
|
361 | 361 | "desc": "commit 0", |
|
362 | 362 | "line": "line 3 \n", |
|
363 | 363 | "lineno": 6, |
|
364 | 364 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
365 | 365 | "revdate": [ |
|
366 | 366 | 0.0, |
|
367 | 367 | 0 |
|
368 | 368 | ], |
|
369 | 369 | "targetline": 4 |
|
370 | 370 | } |
|
371 | 371 | ], |
|
372 | 372 | "author": "test", |
|
373 | 373 | "children": [], |
|
374 | 374 | "date": [ |
|
375 | 375 | 0.0, |
|
376 | 376 | 0 |
|
377 | 377 | ], |
|
378 | 378 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
379 | 379 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
380 | 380 | "parents": [ |
|
381 | 381 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
382 | 382 | ], |
|
383 | 383 | "permissions": "" |
|
384 | 384 | } |
|
385 | 385 | |
|
386 | 386 | ignorews=0 query string argument disables when config defaults to enabled |
|
387 | 387 | |
|
388 | 388 | $ get-with-headers.py --json $LOCALIP:$HGPORT1 'json-annotate/9d1b2c7db017/foo?ignorews=0' |
|
389 | 389 | 200 Script output follows |
|
390 | 390 | |
|
391 | 391 | { |
|
392 | 392 | "abspath": "foo", |
|
393 | 393 | "annotate": [ |
|
394 | 394 | { |
|
395 | 395 | "abspath": "foo", |
|
396 | 396 | "author": "test", |
|
397 | 397 | "desc": "commit 4 (intra whitespace on line 0)", |
|
398 | 398 | "line": "line 0\n", |
|
399 | 399 | "lineno": 1, |
|
400 | 400 | "node": "08adbe269f24cf22d975eadeec16790c5b22f558", |
|
401 | 401 | "revdate": [ |
|
402 | 402 | 0.0, |
|
403 | 403 | 0 |
|
404 | 404 | ], |
|
405 | 405 | "targetline": 1 |
|
406 | 406 | }, |
|
407 | 407 | { |
|
408 | 408 | "abspath": "foo", |
|
409 | 409 | "author": "test", |
|
410 | 410 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
411 | 411 | "line": "\n", |
|
412 | 412 | "lineno": 2, |
|
413 | 413 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
414 | 414 | "revdate": [ |
|
415 | 415 | 0.0, |
|
416 | 416 | 0 |
|
417 | 417 | ], |
|
418 | 418 | "targetline": 2 |
|
419 | 419 | }, |
|
420 | 420 | { |
|
421 | 421 | "abspath": "foo", |
|
422 | 422 | "author": "test", |
|
423 | 423 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
424 | 424 | "line": "\n", |
|
425 | 425 | "lineno": 3, |
|
426 | 426 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
427 | 427 | "revdate": [ |
|
428 | 428 | 0.0, |
|
429 | 429 | 0 |
|
430 | 430 | ], |
|
431 | 431 | "targetline": 3 |
|
432 | 432 | }, |
|
433 | 433 | { |
|
434 | 434 | "abspath": "foo", |
|
435 | 435 | "author": "test", |
|
436 | 436 | "desc": "commit 1", |
|
437 | 437 | "line": "line 1 modified by 1\n", |
|
438 | 438 | "lineno": 4, |
|
439 | 439 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
440 | 440 | "revdate": [ |
|
441 | 441 | 0.0, |
|
442 | 442 | 0 |
|
443 | 443 | ], |
|
444 | 444 | "targetline": 2 |
|
445 | 445 | }, |
|
446 | 446 | { |
|
447 | 447 | "abspath": "foo", |
|
448 | 448 | "author": "test", |
|
449 | 449 | "desc": "commit 2 (leading whitespace on line 2)", |
|
450 | 450 | "line": " line 2\n", |
|
451 | 451 | "lineno": 5, |
|
452 | 452 | "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602", |
|
453 | 453 | "revdate": [ |
|
454 | 454 | 0.0, |
|
455 | 455 | 0 |
|
456 | 456 | ], |
|
457 | 457 | "targetline": 3 |
|
458 | 458 | }, |
|
459 | 459 | { |
|
460 | 460 | "abspath": "foo", |
|
461 | 461 | "author": "test", |
|
462 | 462 | "desc": "commit 3 (trailing whitespace on line 3)", |
|
463 | 463 | "line": "line 3 \n", |
|
464 | 464 | "lineno": 6, |
|
465 | 465 | "node": "dcb62cfbfc9b3ab995a5cbbaff6e1971c3e4f865", |
|
466 | 466 | "revdate": [ |
|
467 | 467 | 0.0, |
|
468 | 468 | 0 |
|
469 | 469 | ], |
|
470 | 470 | "targetline": 4 |
|
471 | 471 | } |
|
472 | 472 | ], |
|
473 | 473 | "author": "test", |
|
474 | 474 | "children": [], |
|
475 | 475 | "date": [ |
|
476 | 476 | 0.0, |
|
477 | 477 | 0 |
|
478 | 478 | ], |
|
479 | 479 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
480 | 480 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
481 | 481 | "parents": [ |
|
482 | 482 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
483 | 483 | ], |
|
484 | 484 | "permissions": "" |
|
485 | 485 | } |
|
486 | 486 | |
|
487 | 487 | ignorewsamount=1 query string enables whitespace amount skipping |
|
488 | 488 | |
|
489 | 489 | $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignorewsamount=1' |
|
490 | 490 | 200 Script output follows |
|
491 | 491 | |
|
492 | 492 | { |
|
493 | 493 | "abspath": "foo", |
|
494 | 494 | "annotate": [ |
|
495 | 495 | { |
|
496 | 496 | "abspath": "foo", |
|
497 | 497 | "author": "test", |
|
498 | 498 | "desc": "commit 0", |
|
499 | 499 | "line": "line 0\n", |
|
500 | 500 | "lineno": 1, |
|
501 | 501 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
502 | 502 | "revdate": [ |
|
503 | 503 | 0.0, |
|
504 | 504 | 0 |
|
505 | 505 | ], |
|
506 | 506 | "targetline": 1 |
|
507 | 507 | }, |
|
508 | 508 | { |
|
509 | 509 | "abspath": "foo", |
|
510 | 510 | "author": "test", |
|
511 | 511 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
512 | 512 | "line": "\n", |
|
513 | 513 | "lineno": 2, |
|
514 | 514 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
515 | 515 | "revdate": [ |
|
516 | 516 | 0.0, |
|
517 | 517 | 0 |
|
518 | 518 | ], |
|
519 | 519 | "targetline": 2 |
|
520 | 520 | }, |
|
521 | 521 | { |
|
522 | 522 | "abspath": "foo", |
|
523 | 523 | "author": "test", |
|
524 | 524 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
525 | 525 | "line": "\n", |
|
526 | 526 | "lineno": 3, |
|
527 | 527 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
528 | 528 | "revdate": [ |
|
529 | 529 | 0.0, |
|
530 | 530 | 0 |
|
531 | 531 | ], |
|
532 | 532 | "targetline": 3 |
|
533 | 533 | }, |
|
534 | 534 | { |
|
535 | 535 | "abspath": "foo", |
|
536 | 536 | "author": "test", |
|
537 | 537 | "desc": "commit 1", |
|
538 | 538 | "line": "line 1 modified by 1\n", |
|
539 | 539 | "lineno": 4, |
|
540 | 540 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
541 | 541 | "revdate": [ |
|
542 | 542 | 0.0, |
|
543 | 543 | 0 |
|
544 | 544 | ], |
|
545 | 545 | "targetline": 2 |
|
546 | 546 | }, |
|
547 | 547 | { |
|
548 | 548 | "abspath": "foo", |
|
549 | 549 | "author": "test", |
|
550 | 550 | "desc": "commit 2 (leading whitespace on line 2)", |
|
551 | 551 | "line": " line 2\n", |
|
552 | 552 | "lineno": 5, |
|
553 | 553 | "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602", |
|
554 | 554 | "revdate": [ |
|
555 | 555 | 0.0, |
|
556 | 556 | 0 |
|
557 | 557 | ], |
|
558 | 558 | "targetline": 3 |
|
559 | 559 | }, |
|
560 | 560 | { |
|
561 | 561 | "abspath": "foo", |
|
562 | 562 | "author": "test", |
|
563 | 563 | "desc": "commit 0", |
|
564 | 564 | "line": "line 3 \n", |
|
565 | 565 | "lineno": 6, |
|
566 | 566 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
567 | 567 | "revdate": [ |
|
568 | 568 | 0.0, |
|
569 | 569 | 0 |
|
570 | 570 | ], |
|
571 | 571 | "targetline": 4 |
|
572 | 572 | } |
|
573 | 573 | ], |
|
574 | 574 | "author": "test", |
|
575 | 575 | "children": [], |
|
576 | 576 | "date": [ |
|
577 | 577 | 0.0, |
|
578 | 578 | 0 |
|
579 | 579 | ], |
|
580 | 580 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
581 | 581 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
582 | 582 | "parents": [ |
|
583 | 583 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
584 | 584 | ], |
|
585 | 585 | "permissions": "" |
|
586 | 586 | } |
|
587 | 587 | |
|
588 | 588 | ignorewseol=1 query string enables whitespace end of line skipping |
|
589 | 589 | |
|
590 | 590 | $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignorewseol=1' |
|
591 | 591 | 200 Script output follows |
|
592 | 592 | |
|
593 | 593 | { |
|
594 | 594 | "abspath": "foo", |
|
595 | 595 | "annotate": [ |
|
596 | 596 | { |
|
597 | 597 | "abspath": "foo", |
|
598 | 598 | "author": "test", |
|
599 | 599 | "desc": "commit 4 (intra whitespace on line 0)", |
|
600 | 600 | "line": "line 0\n", |
|
601 | 601 | "lineno": 1, |
|
602 | 602 | "node": "08adbe269f24cf22d975eadeec16790c5b22f558", |
|
603 | 603 | "revdate": [ |
|
604 | 604 | 0.0, |
|
605 | 605 | 0 |
|
606 | 606 | ], |
|
607 | 607 | "targetline": 1 |
|
608 | 608 | }, |
|
609 | 609 | { |
|
610 | 610 | "abspath": "foo", |
|
611 | 611 | "author": "test", |
|
612 | 612 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
613 | 613 | "line": "\n", |
|
614 | 614 | "lineno": 2, |
|
615 | 615 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
616 | 616 | "revdate": [ |
|
617 | 617 | 0.0, |
|
618 | 618 | 0 |
|
619 | 619 | ], |
|
620 | 620 | "targetline": 2 |
|
621 | 621 | }, |
|
622 | 622 | { |
|
623 | 623 | "abspath": "foo", |
|
624 | 624 | "author": "test", |
|
625 | 625 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
626 | 626 | "line": "\n", |
|
627 | 627 | "lineno": 3, |
|
628 | 628 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
629 | 629 | "revdate": [ |
|
630 | 630 | 0.0, |
|
631 | 631 | 0 |
|
632 | 632 | ], |
|
633 | 633 | "targetline": 3 |
|
634 | 634 | }, |
|
635 | 635 | { |
|
636 | 636 | "abspath": "foo", |
|
637 | 637 | "author": "test", |
|
638 | 638 | "desc": "commit 1", |
|
639 | 639 | "line": "line 1 modified by 1\n", |
|
640 | 640 | "lineno": 4, |
|
641 | 641 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
642 | 642 | "revdate": [ |
|
643 | 643 | 0.0, |
|
644 | 644 | 0 |
|
645 | 645 | ], |
|
646 | 646 | "targetline": 2 |
|
647 | 647 | }, |
|
648 | 648 | { |
|
649 | 649 | "abspath": "foo", |
|
650 | 650 | "author": "test", |
|
651 | 651 | "desc": "commit 2 (leading whitespace on line 2)", |
|
652 | 652 | "line": " line 2\n", |
|
653 | 653 | "lineno": 5, |
|
654 | 654 | "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602", |
|
655 | 655 | "revdate": [ |
|
656 | 656 | 0.0, |
|
657 | 657 | 0 |
|
658 | 658 | ], |
|
659 | 659 | "targetline": 3 |
|
660 | 660 | }, |
|
661 | 661 | { |
|
662 | 662 | "abspath": "foo", |
|
663 | 663 | "author": "test", |
|
664 | 664 | "desc": "commit 0", |
|
665 | 665 | "line": "line 3 \n", |
|
666 | 666 | "lineno": 6, |
|
667 | 667 | "node": "b9c578134d72b3a9d26afde8ddd76c0a93c5adbc", |
|
668 | 668 | "revdate": [ |
|
669 | 669 | 0.0, |
|
670 | 670 | 0 |
|
671 | 671 | ], |
|
672 | 672 | "targetline": 4 |
|
673 | 673 | } |
|
674 | 674 | ], |
|
675 | 675 | "author": "test", |
|
676 | 676 | "children": [], |
|
677 | 677 | "date": [ |
|
678 | 678 | 0.0, |
|
679 | 679 | 0 |
|
680 | 680 | ], |
|
681 | 681 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
682 | 682 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
683 | 683 | "parents": [ |
|
684 | 684 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
685 | 685 | ], |
|
686 | 686 | "permissions": "" |
|
687 | 687 | } |
|
688 | 688 | |
|
689 | 689 | ignoreblanklines=1 query string enables whitespace blank line skipping |
|
690 | 690 | |
|
691 | 691 | $ get-with-headers.py --json $LOCALIP:$HGPORT 'json-annotate/9d1b2c7db017/foo?ignoreblanklines=1' |
|
692 | 692 | 200 Script output follows |
|
693 | 693 | |
|
694 | 694 | { |
|
695 | 695 | "abspath": "foo", |
|
696 | 696 | "annotate": [ |
|
697 | 697 | { |
|
698 | 698 | "abspath": "foo", |
|
699 | 699 | "author": "test", |
|
700 | 700 | "desc": "commit 4 (intra whitespace on line 0)", |
|
701 | 701 | "line": "line 0\n", |
|
702 | 702 | "lineno": 1, |
|
703 | 703 | "node": "08adbe269f24cf22d975eadeec16790c5b22f558", |
|
704 | 704 | "revdate": [ |
|
705 | 705 | 0.0, |
|
706 | 706 | 0 |
|
707 | 707 | ], |
|
708 | 708 | "targetline": 1 |
|
709 | 709 | }, |
|
710 | 710 | { |
|
711 | 711 | "abspath": "foo", |
|
712 | 712 | "author": "test", |
|
713 | 713 | "desc": "commit 5 (add blank line between line 0 and 1)", |
|
714 | 714 | "line": "\n", |
|
715 | 715 | "lineno": 2, |
|
716 | 716 | "node": "400ef1d404706cfb48afd2b78ce6addf641ced25", |
|
717 | 717 | "revdate": [ |
|
718 | 718 | 0.0, |
|
719 | 719 | 0 |
|
720 | 720 | ], |
|
721 | 721 | "targetline": 2 |
|
722 | 722 | }, |
|
723 | 723 | { |
|
724 | 724 | "abspath": "foo", |
|
725 | 725 | "author": "test", |
|
726 | 726 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
727 | 727 | "line": "\n", |
|
728 | 728 | "lineno": 3, |
|
729 | 729 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
730 | 730 | "revdate": [ |
|
731 | 731 | 0.0, |
|
732 | 732 | 0 |
|
733 | 733 | ], |
|
734 | 734 | "targetline": 3 |
|
735 | 735 | }, |
|
736 | 736 | { |
|
737 | 737 | "abspath": "foo", |
|
738 | 738 | "author": "test", |
|
739 | 739 | "desc": "commit 1", |
|
740 | 740 | "line": "line 1 modified by 1\n", |
|
741 | 741 | "lineno": 4, |
|
742 | 742 | "node": "23e1e37387dcfca4c0ed0cc568d1e4b9bfed241a", |
|
743 | 743 | "revdate": [ |
|
744 | 744 | 0.0, |
|
745 | 745 | 0 |
|
746 | 746 | ], |
|
747 | 747 | "targetline": 2 |
|
748 | 748 | }, |
|
749 | 749 | { |
|
750 | 750 | "abspath": "foo", |
|
751 | 751 | "author": "test", |
|
752 | 752 | "desc": "commit 2 (leading whitespace on line 2)", |
|
753 | 753 | "line": " line 2\n", |
|
754 | 754 | "lineno": 5, |
|
755 | 755 | "node": "6bdb694e7b8cebb68d5b6b27b4bcc2a49d62c602", |
|
756 | 756 | "revdate": [ |
|
757 | 757 | 0.0, |
|
758 | 758 | 0 |
|
759 | 759 | ], |
|
760 | 760 | "targetline": 3 |
|
761 | 761 | }, |
|
762 | 762 | { |
|
763 | 763 | "abspath": "foo", |
|
764 | 764 | "author": "test", |
|
765 | 765 | "desc": "commit 3 (trailing whitespace on line 3)", |
|
766 | 766 | "line": "line 3 \n", |
|
767 | 767 | "lineno": 6, |
|
768 | 768 | "node": "dcb62cfbfc9b3ab995a5cbbaff6e1971c3e4f865", |
|
769 | 769 | "revdate": [ |
|
770 | 770 | 0.0, |
|
771 | 771 | 0 |
|
772 | 772 | ], |
|
773 | 773 | "targetline": 4 |
|
774 | 774 | } |
|
775 | 775 | ], |
|
776 | 776 | "author": "test", |
|
777 | 777 | "children": [], |
|
778 | 778 | "date": [ |
|
779 | 779 | 0.0, |
|
780 | 780 | 0 |
|
781 | 781 | ], |
|
782 | 782 | "desc": "commit 6 (add another blank line between line 0 and 1)", |
|
783 | 783 | "node": "9d1b2c7db0175870a950f8c48c9c4ead1058f2c5", |
|
784 | 784 | "parents": [ |
|
785 | 785 | "400ef1d404706cfb48afd2b78ce6addf641ced25" |
|
786 | 786 | ], |
|
787 | 787 | "permissions": "" |
|
788 | 788 | } |
General Comments 0
You need to be logged in to leave comments.
Login now