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
F18775200: D16133.id.diff
Fri, Oct 10, 6:15 PM
F18772782: D16133.diff
Thu, Oct 9, 4:43 AM
F18757428: D16133.id38811.diff
Sun, Oct 5, 5:25 PM
F18670900: D16133.diff
Sep 25 2025, 2:01 AM
F18510598: D16133.diff
Sep 5 2025, 4:50 AM
F18507729: D16133.id.diff
Sep 5 2025, 2:23 AM
F18500342: D16133.diff
Sep 4 2025, 8:39 PM
F18133642: D16133.id38817.diff
Aug 13 2025, 11:01 PM
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.