##// END OF EJS Templates
Alwas show initial context on html diffs.
marcink -
r2359:a264d898 beta
parent child Browse files
Show More
@@ -286,8 +286,6 b' class DiffProcessor(object):'
286 286 files = []
287 287 try:
288 288 line = lineiter.next()
289 # skip first context
290 skipfirst = True
291 289 while 1:
292 290 # continue until we found the old file
293 291 if not line.startswith('--- '):
@@ -317,22 +315,23 b' class DiffProcessor(object):'
317 315 [int(x or 1) for x in match.groups()[:-1]]
318 316 old_line -= 1
319 317 new_line -= 1
320 context = len(match.groups()) == 5
318 gr = match.groups()
319 context = len(gr) == 5
321 320 old_end += old_line
322 321 new_end += new_line
323 322
324 323 if context:
325 if not skipfirst:
324 # skip context only if it's first line
325 if int(gr[0]) > 1:
326 326 lines.append({
327 327 'old_lineno': '...',
328 328 'new_lineno': '...',
329 329 'action': 'context',
330 330 'line': line,
331 331 })
332 else:
333 skipfirst = False
334 332
335 333 line = lineiter.next()
334
336 335 while old_line < old_end or new_line < new_end:
337 336 if line:
338 337 command, line = line[0], line[1:]
General Comments 0
You need to be logged in to leave comments. Login now