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
F14962470: D16133.diff
Sun, Feb 16, 6:59 AM
Unknown Object (File)
Mon, Feb 10, 1:20 PM
Unknown Object (File)
Sun, Feb 9, 1:50 AM
Unknown Object (File)
Sun, Feb 9, 1:49 AM
Unknown Object (File)
Sun, Feb 9, 1:49 AM
Unknown Object (File)
Sat, Feb 8, 9:30 PM
Unknown Object (File)
Mon, Jan 27, 5:20 AM
Unknown Object (File)
Fri, Jan 24, 2:06 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.