HomeSoftware Heritage

Rework the way we process snapshots and branches
62a84d50063eUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Rework the way we process snapshots and branches

Summary:
The previous code uses a brittle double-iteration and would break in a subtle
way when having several branches pointing at the same target. Surprisingly, we
didn't notice it before, even though most snapshots have a HEAD and
refs/heads/master branch pointing to the same object.

I've also added FIXMEs for things I noticed should be changed in the long run.

Depends on D415

Test Plan: the test case has been updated to exert the issue in the old code

Reviewers: Reviewers!

Differential Revision: https://forge.softwareheritage.org/D417

Details

Provenance
olasdAuthored on Sep 19 2018, 11:08 AM
anlambertCommitted on Sep 19 2018, 11:08 AM
douarddaPushed on Oct 5 2018, 2:30 PM
Differential Revision
D417: Rework the way we process snapshots and branches
Parents
R65:0dca31565ee5: Update SwhBrowseUtilsTestCase.get_origin_visit_snapshot with real-world data
Branches
Unknown
Tags
Unknown