aboutsummaryrefslogtreecommitdiffstats
path: root/git_deps
diff options
context:
space:
mode:
authorAdam Spiers <git@adamspiers.org>2016-07-03 09:14:34 -0600
committerAdam Spiers <git@adamspiers.org>2018-05-15 13:42:16 +0100
commit0aa44d5638ef72b1ca458355b5b4bf46438c5c56 (patch)
treebaa7f2d41481eee0acf14ac632ea2336b2e29a4f /git_deps
parent1297a749c7842f49ef45fbda14163b4ad62eb639 (diff)
downloadgit-deps-0aa44d5638ef72b1ca458355b5b4bf46438c5c56.tar.gz
improve blame line tracking
Diffstat (limited to 'git_deps')
-rw-r--r--git_deps/detector.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/git_deps/detector.py b/git_deps/detector.py
index 88c784c..25c9278 100644
--- a/git_deps/detector.py
+++ b/git_deps/detector.py
@@ -227,10 +227,15 @@ class DependencyDetector(object):
dependent, dependency, path, line_num)
if line_num in dep_sources[path]:
- abort("line %d already found when blaming %s:%s" %
- (line_num, parent.hex[:8], path))
-
- dep_sources[path][line_num] = True
+ abort("line %d already found when blaming %s:%s\n"
+ "old:\n %s\n"
+ "new:\n %s" %
+ (line_num, parent.hex[:8], path,
+ dep_sources[path][line_num], line))
+
+ dep_sources[path][line_num] = line
+ self.logger.debug(" New line for %s -> %s: %s" %
+ (dependent_sha1[:8], dependency_sha1[:8], line))
self.notify_listeners('new_line',
dependent, dependency, path, line_num)