Homec4science

Add an "Unreachable" flag for commits and revive them during discovery

Authored by epriestley <git@epriestley.com> on Jun 16 2016, 16:24.

Description

Add an "Unreachable" flag for commits and revive them during discovery

Summary:
Ref T9028. This is the easy part of dealing with deleted commits:

  • Add a flag for unreachable commits (nothing sets this flag yet).
  • Ignore unreachable commits when querying for known commits during discovery, so we pretend they do not exist.
  • When recording a commit, try just reviving an existing unreachable commit first. If that works, bail out.

Test Plan:

  • Artificially marked a commit as unreachable with raw SQL.
  • Verified it said "deleted: unreachable" in the UI.
  • Ran repository discover --trace --verbose.
  • Saw the discovery process ignore the commit when filling the cache.
  • Saw the discovery process revive the commit instead of trying to record it again.
  • Web UI now shows the commit as normal.
  • Running repository discover again doesn't make any further changes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9028

Differential Revision: https://secure.phabricator.com/D16130

Details

Committed
epriestley <git@epriestley.com>Jun 16 2016, 20:20
Pushed
aubortJan 31 2017, 17:16
Parents
rPH2949905c045b: Fetch and discover all Git ref types, not just branches
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHec89c7d63e26: Add an "Unreachable" flag for commits and revive them during discovery (authored by epriestley <git@epriestley.com>).Jun 16 2016, 20:20