module documentation
Annotate file contents indicating when they were last changed.
Annotated lines are represented as tuples with last modified revision SHA1 and contents.
Please note that this is a very naive annotate implementation. It works, but its speed could be improved - in particular because it uses Python's difflib.
| Function | annotate |
Annotate the lines of a blob. |
| Function | update |
Update annotation lines with old blob lines. |
def annotate_lines(store:
BaseObjectStore, commit_id: ObjectID, path: bytes, order: str = ORDER_DATE, lines: Sequence[ tuple[ tuple[ Commit, TreeEntry], bytes]] | None = None, follow: bool = True) -> list[ tuple[ tuple[ Commit, TreeEntry], bytes]]:
¶
Annotate the lines of a blob.
| Parameters | |
store:BaseObjectStore | Object store to retrieve objects from |
commitObjectID | Commit id in which to annotate path |
path:bytes | Path to annotate |
order:str | Order in which to process history (defaults to ORDER_DATE) |
lines:Sequence[ | Initial lines to compare to (defaults to specified) |
follow:bool | Whether to follow changes across renames/copies |
| Returns | |
list[ | List of (commit, line) entries where commit is the oldest commit that changed a line |