Page MenuHomePhabricator

Guarantee repositories have unique local paths
ClosedPublic

Authored by epriestley on May 3 2016, 7:40 PM.
Tags
None
Referenced Files
F18733330: D15837.id.diff
Tue, Sep 30, 10:32 PM
F18657357: D15837.diff
Tue, Sep 23, 1:26 AM
F18604874: D15837.id.diff
Sat, Sep 13, 7:18 PM
F18597831: D15837.diff
Sat, Sep 13, 3:47 AM
F18590473: D15837.diff
Fri, Sep 12, 6:11 AM
F18589048: D15837.diff
Fri, Sep 12, 2:15 AM
F18524056: D15837.diff
Sat, Sep 6, 11:33 AM
F18199562: D15837.id38165.diff
Aug 18 2025, 1:58 AM
Subscribers
None

Details

Summary

Ref T4039. Long ago these were more freely editable and there were some security concerns around creating a repository, then setting its local path to point somewhere it shouldn't.

Local paths are no longer editable so there's no real reason we need to provide a uniqueness guarantee anymore, but you could still make a mistake with bin/repository move-paths by accident, and it's a little cleaner to pull them out into their own column with a key.

(We still don't -- and, largely can't -- guarantee that two paths aren't equivalent since one might be symlinked to the other, or symlinked only on some hosts, or whatever, but the primary value here is as a sanity check that you aren't goofing things up and pointing a bunch of repositories at the same working copy by mistake.)

Test Plan
  • Ran migrations.
  • Grepped for local-path.
  • Listed and moved paths with bin/repository.
  • Created a new repository, verified its local path populated correctly.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable