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
Unknown Object (File)
Sat, Dec 7, 8:40 PM
Unknown Object (File)
Fri, Nov 29, 8:34 AM
Unknown Object (File)
Wed, Nov 27, 3:07 AM
Unknown Object (File)
Sat, Nov 23, 7:39 AM
Unknown Object (File)
Nov 19 2024, 6:53 AM
Unknown Object (File)
Nov 14 2024, 11:07 PM
Unknown Object (File)
Nov 14 2024, 4:25 AM
Unknown Object (File)
Nov 13 2024, 12:21 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.