HomePhabricator

Update major RefCursor callsites to work properly with RefPosition

Description

Update major RefCursor callsites to work properly with RefPosition

Summary:
Ref T11823. This is the meaty part of the change, and updates RefEngine to use separate RefCursor (for names) and RefPosition (for actual commit positions) tables.

I'll hold this whole series until after the release cut so it has some time to bake on secure to look for issues. It's also not a huge problem if there are bugs here since these tables are just caches anyway, although they do feed into some other things, and obviously it's never good to have bugs.

Test Plan:

  • This logic can be invoked directly with bin/repository refs <repository> --trace --verbose.
  • Ran that on unchanged repositories, new branches, removed branches, and modified branches. Saw appropriate output and cursor positions.
  • Ran on a mercurial repository to test the close/open logic, saw it correct open/closed state of incorrect positions.
  • Browed around Diffusion in various repositories.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T11823

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