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
Loading
Please register or sign in to comment