Show More
@@ -360,41 +360,38 b' class DiffProcessor(object):' | |||
|
360 | 360 | stats = None |
|
361 | 361 | msgs = [] |
|
362 | 362 | |
|
363 |
if |
|
|
364 | op = 'A' | |
|
365 | stats = ['b', NEW_FILENODE] | |
|
366 | msgs.append('new file') | |
|
367 | elif head['a_file'] and head['b_file']: | |
|
368 | op = 'M' | |
|
369 | stats = ['b', MOD_FILENODE] | |
|
370 | elif head['a_file'] and not head['b_file']: | |
|
363 | if head['deleted_file_mode']: | |
|
371 | 364 | op = 'D' |
|
372 | 365 | stats = ['b', DEL_FILENODE] |
|
373 | 366 | msgs.append('deleted file') |
|
367 | elif head['new_file_mode']: | |
|
368 | op = 'A' | |
|
369 | stats = ['b', NEW_FILENODE] | |
|
370 | msgs.append('new file %s' % head['new_file_mode']) | |
|
374 | 371 | else: |
|
375 |
if head[' |
|
|
376 |
op = ' |
|
|
377 |
stats = ['b', D |
|
|
378 |
msgs.append(' |
|
|
379 |
|
|
|
380 | op = 'A' | |
|
381 | stats = ['b', NEW_FILENODE] | |
|
382 | msgs.append('new file %s' % head['new_file_mode']) | |
|
383 | else: | |
|
384 | if head['new_mode'] and head['old_mode']: | |
|
385 | op = 'M' | |
|
386 | stats = ['b', CHMOD_FILENODE] | |
|
387 | msgs.append('modified file chmod %s => %s' | |
|
388 | % (head['old_mode'], head['new_mode'])) | |
|
389 | if (head['rename_from'] and head['rename_to'] | |
|
390 | and head['rename_from'] != head['rename_to']): | |
|
391 | op = 'M' | |
|
392 | stats = ['b', RENAMED_FILENODE] # might overwrite CHMOD_FILENODE | |
|
393 | msgs.append('file renamed from %s to %s' | |
|
394 | % (head['rename_from'], head['rename_to'])) | |
|
395 |
|
|
|
396 |
|
|
|
397 |
|
|
|
372 | if head['new_mode'] and head['old_mode']: | |
|
373 | op = 'M' | |
|
374 | stats = ['b', CHMOD_FILENODE] | |
|
375 | msgs.append('modified file chmod %s => %s' | |
|
376 | % (head['old_mode'], head['new_mode'])) | |
|
377 | if (head['rename_from'] and head['rename_to'] | |
|
378 | and head['rename_from'] != head['rename_to']): | |
|
379 | op = 'M' | |
|
380 | stats = ['b', RENAMED_FILENODE] # might overwrite CHMOD_FILENODE | |
|
381 | msgs.append('file renamed from %s to %s' | |
|
382 | % (head['rename_from'], head['rename_to'])) | |
|
383 | if op is None: # fall back: detect missed old style add or remove | |
|
384 | if not head['a_file'] and head['b_file']: | |
|
385 | op = 'A' | |
|
386 | stats = ['b', NEW_FILENODE] | |
|
387 | msgs.append('new file') | |
|
388 | elif head['a_file'] and not head['b_file']: | |
|
389 | op = 'D' | |
|
390 | stats = ['b', DEL_FILENODE] | |
|
391 | msgs.append('deleted file') | |
|
392 | if op is None: | |
|
393 | op = 'M' | |
|
394 | stats = ['b', MOD_FILENODE] | |
|
398 | 395 | |
|
399 | 396 | if head['a_file'] or head['b_file']: # a real diff |
|
400 | 397 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now