Page MenuHomePhabricator

When a ref is moved or deleted, put it on a list; later, check for reachability
ClosedPublic

Authored by epriestley on Jun 16 2016, 5:48 PM.
Tags
None
Referenced Files
F18510598: D16133.diff
Fri, Sep 5, 4:50 AM
F18507729: D16133.id.diff
Fri, Sep 5, 2:23 AM
F18500342: D16133.diff
Thu, Sep 4, 8:39 PM
F18133642: D16133.id38817.diff
Aug 13 2025, 11:01 PM
F18086224: D16133.id.diff
Aug 5 2025, 8:12 PM
F18053459: D16133.diff
Aug 4 2025, 5:05 AM
Unknown Object (File)
Jul 4 2025, 4:44 PM
Unknown Object (File)
Jul 3 2025, 1:11 AM
Subscribers
None

Details

Summary

Ref T9028. This allows us to detect when commits are unreachable:

  • When a ref (tag, branch, etc) is moved or deleted, store the old thing it pointed at in a list.
  • After discovery, go through the list and check if all the stuff on it is still reachable.
  • If something isn't, try to follow its ancestors back until we find something that is reachable.
  • Then, mark everything we found as unreachable.
  • Finally, rebuild the repository summary table to correct the commit count.
Test Plan
  • Deleted a ref, ran pull + refs, saw oldref in database.
  • Ran discover, saw it process the oldref, mark the unreachable commit, and update the summary table.
  • Visited commit page, saw it properly marked.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to When a ref is moved or deleted, put it on a list; later, check for reachability.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Jun 16 2016, 6:10 PM
This revision was automatically updated to reflect the committed changes.