diff options
author | Martin Liska <mliska@suse.cz> | 2020-06-30 17:44:45 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-06-30 17:45:36 +0200 |
commit | e2c17dcb120813a715e4cfb7559803839d3806d9 (patch) | |
tree | fdfab0b3a79a64ec6ee89f94664b8c44cbfec329 | |
parent | eef63aacb255befb4e483cf680a3d0dcb2d8794e (diff) | |
download | gcc-e2c17dcb120813a715e4cfb7559803839d3806d9.zip gcc-e2c17dcb120813a715e4cfb7559803839d3806d9.tar.gz gcc-e2c17dcb120813a715e4cfb7559803839d3806d9.tar.bz2 |
gcc-changelog: support older GitPython releases.
contrib/ChangeLog:
* gcc-changelog/git_repository.py: Support older releases of
GitPython when renamed_file was named renamed.
-rwxr-xr-x | contrib/gcc-changelog/git_repository.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/gcc-changelog/git_repository.py b/contrib/gcc-changelog/git_repository.py index 4f0d21a..90edc3c 100755 --- a/contrib/gcc-changelog/git_repository.py +++ b/contrib/gcc-changelog/git_repository.py @@ -39,11 +39,15 @@ def parse_git_revisions(repo_path, revisions, strict=False): modified_files = [] for file in diff: + if hasattr(file, 'renamed_file'): + is_renamed = file.renamed_file + else: + is_renamed = file.renamed if file.new_file: t = 'A' elif file.deleted_file: t = 'D' - elif file.renamed_file: + elif is_renamed: # Consider that renamed files are two operations: # the deletion of the original name # and the addition of the new one. |