|
@@ -28,7 +28,6 @@ Python's difflib.
|
|
|
|
|
|
import difflib
|
|
|
|
|
|
-from dulwich.object_store import tree_lookup_path
|
|
|
from dulwich.walk import (
|
|
|
ORDER_DATE,
|
|
|
Walker,
|
|
@@ -39,7 +38,8 @@ from dulwich.walk import (
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
def update_lines(annotated_lines, new_history_data, new_blob):
|
|
|
"""Update annotation lines with old blob lines.
|
|
@@ -61,7 +61,8 @@ def update_lines(annotated_lines, new_history_data, new_blob):
|
|
|
return ret
|
|
|
|
|
|
|
|
|
-def annotate_lines(store, commit_id, path, order=ORDER_DATE, lines=None, follow=True):
|
|
|
+def annotate_lines(store, commit_id, path, order=ORDER_DATE, lines=None,
|
|
|
+ follow=True):
|
|
|
"""Annotate the lines of a blob.
|
|
|
|
|
|
:param store: Object store to retrieve objects from
|
|
@@ -74,7 +75,7 @@ def annotate_lines(store, commit_id, path, order=ORDER_DATE, lines=None, follow=
|
|
|
commit is the oldest commit that changed a line
|
|
|
"""
|
|
|
walker = Walker(store, include=[commit_id], paths=[path], order=order,
|
|
|
- follow=follow)
|
|
|
+ follow=follow)
|
|
|
revs = []
|
|
|
for log_entry in walker:
|
|
|
for tree_change in log_entry.changes():
|