Skip to content
Snippets Groups Projects
Commit 798ac9c4 authored by Georges Racinet's avatar Georges Racinet
Browse files

LastCommitForPath: simpler and more perfomant implementation

The `files` revset predicate is way too slow and answers a
much more complicated question, as it has to follow the entire
history of the given path.

Using `linkrev` on filelogs is not appropriate, because it can point to
any changeset that introduced this version of the file, even if not
an ancestor of `seen_from` (deduplication). Besides, it raises thorny
questions in case path is to be interpreted as a directory, notably
being by definition unable to take children removals into account.

The `files` field of changelog entries, on the other hand, is supposed
to list all files touched by the corresponding changeset. This forces
us to iterate on ancestors, and could be quite arbitrary in cases of merges
whose both parents changed a given path, but in that case the problem itself
is not so well-defined.
parent c7704384
No related branches found
No related tags found
2 merge requests!198Merge stable branch,!195LastCommitForTree... performance improvements
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment