Staging instance, all changes can be removed at any time

Skip to content

Implement efficient comparison of revision trees

This diff adds implementation of an efficient algorithm for comparing two revision trees in order to compute the list of introduced file changes. The algorithm detects the insertion / deletion / modification of files and can also track their renaming if requested.

That algorithm can be found in the diff module, located in the new namespace swh.storage.algos.

That feature is needed to enrich the revision view in the browse application in swh-web. Besides giving the list of changes for a particular revision, it will allow to compute the diffs for each changed file and display them as in every software forge web interface.

Regarding the location of that new utility module, I put it in a new namespace swh.storage.algos. I am not sure if it is the adequate solution, maybe it could be put in a new sub-project swh-algos, centralizing high level algorithms and usefull operations that can be applied to the swh objects contained in the archive.

Related swh-web#921 (closed)


Migrated from D295 (view on Phabricator)

Merge request reports

Loading