Show More
@@ -360,18 +360,6 b' class DiffProcessor(object):' | |||||
360 | stats = None |
|
360 | stats = None | |
361 | msgs = [] |
|
361 | msgs = [] | |
362 |
|
362 | |||
363 | if not head['a_file'] and head['b_file']: |
|
|||
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']: |
|
|||
371 | op = 'D' |
|
|||
372 | stats = ['b', DEL_FILENODE] |
|
|||
373 | msgs.append('deleted file') |
|
|||
374 | else: |
|
|||
375 |
|
|
363 | if head['deleted_file_mode']: | |
376 |
|
|
364 | op = 'D' | |
377 |
|
|
365 | stats = ['b', DEL_FILENODE] | |
@@ -392,6 +380,15 b' class DiffProcessor(object):' | |||||
392 |
|
|
380 | stats = ['b', RENAMED_FILENODE] # might overwrite CHMOD_FILENODE | |
393 |
|
|
381 | msgs.append('file renamed from %s to %s' | |
394 |
|
|
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') | |||
395 |
|
|
392 | if op is None: | |
396 |
|
|
393 | op = 'M' | |
397 |
|
|
394 | stats = ['b', MOD_FILENODE] |
General Comments 0
You need to be logged in to leave comments.
Login now