mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
ce373ec652
Summary: Design doc for the Deleted Files Manifest derived data structure - https://fb.quip.com/Wk4XAi7dyXRr. **This diff adds derivation logic for merge commits.** For linear case each deleted manifest node has an optional liknode, that points to the changeset id where the path was deleted. If the liknode is None it means that the path is or was a directory and its subentries were deleted, but the path itself still exists. The idea for merge commits is that paths deleted in merges now will have liknodes pointing to the merge commit. So if the path was deleted in both branches of the merge commit, then deleted manifest of the merge commit will have a linknode for the path pointing to the merge commit itself. (For the examples see the test cases below.) **To generate file history for the deleted file:** If there is no unode for the given commit and path: * search for the path in the Deleted files manifest * if there is no node, there was no such path in the repo * from the manifest's liknode get the changeset id where the file was deleted * get the changeset's parents * for each parent try to find unode, if there is unode, then traverse history * otherwise check deleted manifest again (going back to the beginning) This logic is going to be implemented in another diff. Reviewed By: StanislavGlebik Differential Revision: D21182002 fbshipit-source-id: 4dfa5ae0dab20a51d78e75c0fafb624f1a652fff |
||
---|---|---|
.. | ||
blame | ||
changeset_info | ||
deleted_files_manifest | ||
fastlog | ||
filenodes | ||
fsnodes | ||
mercurial_derived_data | ||
src | ||
unodes | ||
utils | ||
Cargo.toml |