Homec4science

Guarantee repositories have unique local paths

Authored by epriestley <git@epriestley.com> on May 3 2016, 21:22.

Description

Guarantee repositories have unique local paths

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.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4039

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

Details

Committed
epriestley <git@epriestley.com>May 5 2016, 01:09
Pushed
aubortJan 31 2017, 17:16
Parents
rPHd85386488bf5: Add "wide" remarkup image support for Documents
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHdd2b10b8f859: Guarantee repositories have unique local paths (authored by epriestley <git@epriestley.com>).May 5 2016, 01:09