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
F14024170: D16133.diff
Thu, Nov 7, 6:43 AM
F13979395: D16133.diff
Sat, Oct 19, 4:15 AM
F13968945: D16133.id.diff
Wed, Oct 16, 11:38 PM
Unknown Object (File)
Oct 9 2024, 4:11 AM
Unknown Object (File)
Oct 4 2024, 3:47 AM
Unknown Object (File)
Oct 2 2024, 11:28 AM
Unknown Object (File)
Sep 12 2024, 8:34 AM
Unknown Object (File)
Sep 5 2024, 8:52 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.