diff options
author | Michael Stefaniuc <mstefani@winehq.org> | 2016-01-28 01:09:50 +0100 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2016-05-12 14:01:23 +0200 |
commit | c627b646bf401204f3e3ab72cb7053e89f25ab96 (patch) | |
tree | 67897940b88e6a21db76be8dfb0aa324b298e1d6 /git-deps.py | |
parent | bd9ed690b5f8d30c58e8d5d08dea6cdf18eccd97 (diff) | |
download | git-deps-c627b646bf401204f3e3ab72cb7053e89f25ab96.tar.gz |
Account for Diff API changes in pygit2 version 0.22.1.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Diffstat (limited to 'git-deps.py')
-rwxr-xr-x | git-deps.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/git-deps.py b/git-deps.py index d28c85e..234d92a 100755 --- a/git-deps.py +++ b/git-deps.py @@ -420,7 +420,7 @@ class DependencyDetector(object): diff = self.repo.diff(parent, dependent, context_lines=self.options.context_lines) for patch in diff: - path = patch.old_file_path + path = patch.delta.old_file.path self.logger.debug(" Examining hunks in %s" % path) for hunk in patch.hunks: self.blame_hunk(dependent, parent, path, hunk) @@ -522,14 +522,14 @@ class DependencyDetector(object): hunk_header = '@@ %s %s @@' % (line_range_before, line_range_after) self.logger.debug(diff_format % ('--------', '-----', '', hunk_header)) line_num = hunk.old_start - for mode, line in hunk.lines: - if mode == '+': + for line in hunk.lines: + if line.origin == '+': rev = ln = '' else: rev = line_to_culprit[line_num] ln = line_num line_num += 1 - self.logger.debug(diff_format % (rev, ln, mode, line.rstrip())) + self.logger.debug(diff_format % (rev, ln, line.origin, line.content.rstrip())) def oneline(self, commit): return commit.message.split('\n', 1)[0] |