Page MenuHomePhabricator

Add a RefPosition table to hold branch/tag positions once the RefCursor table is split
ClosedPublic

Authored by epriestley on Sep 14 2017, 12:13 PM.
Tags
None
Referenced Files
F15452247: D18602.id44665.diff
Sat, Mar 29, 3:21 AM
F15448869: D18602.id44691.diff
Fri, Mar 28, 7:14 AM
F15448015: D18602.id44665.diff
Fri, Mar 28, 2:53 AM
F15440762: D18602.id44665.diff
Wed, Mar 26, 2:24 PM
F15435753: D18602.id.diff
Tue, Mar 25, 10:02 AM
F15433709: D18602.diff
Tue, Mar 25, 12:20 AM
F15407357: D18602.diff
Tue, Mar 18, 5:06 PM
F15398801: D18602.id.diff
Mon, Mar 17, 1:45 AM
Subscribers
None

Details

Summary

Ref T11823. Currently, we have a "RefCursor" table which stores rows like <branch or tag name, commit it is pointing at> with some more data.

Because Mercurial can have a single branch pointing at several different places, this table must allow multiple rows with the same branch or tag name.

Among other things, this means there isn't a single PHID which can be used to identify a branch name in a stable way. However, we have several UIs where we want to be able to do this.

Some specific examples where we run into trouble: in Mercurial, if there are 5 heads for "default", that means there are 5 phids. And currently, if someone deletes a branch, we lose the PHID for it. Instead, we'd rather retain it so the whole world doesn't break if you accidentally delete a branch and then fix it a little later.

(I'll likely hold this until the rest of the logic is fleshed out a little more in followup changes.)

Test Plan

Ran bin/storage upgrade, saw the table get created without warnings.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable