pull-requests: handle case when removing existing files from a repository in versioning diff.
marcink -
r4129:603689e4 default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -970,8 +970,13
970
970
971 old_hash = old_files.get(new_filename)
971 old_hash = old_files.get(new_filename)
972 if not old_hash:
972 if not old_hash:
973 # file is not present in old diff, means it's added
973 # file is not present in old diff, we have to figure out from parsed diff
974 added_files.append(new_filename)
974 # operation ADD/REMOVE
975 operations_dict = diff_data['stats']['ops']
976 if diffs.DEL_FILENODE in operations_dict:
977 removed_files.append(new_filename)
978 else:
979 added_files.append(new_filename)
975 else:
980 else:
976 if new_hash != old_hash:
981 if new_hash != old_hash:
977 modified_files.append(new_filename)
982 modified_files.append(new_filename)
Comments 0
You need to be logged in to leave comments. Login now