HomePhorge

Fix several safety issues with repository URIs

Description

Fix several safety issues with repository URIs

Summary:
See PHI234. Several issues here:

  • The warning about observing a repository in Read/Write mode checks the raw I/O type, not the effective I/O type. That means we can fail to warn if other URIs are set to "Default", and "Default" is "Read/Write" in practice.
  • There's just an actual typo which prevents the "Observe" version of this error from triggering properly.

Additionally, add more forceful warnings that "Observe" and "Mirror" mean that you want to replace a repository with another one, not that we somehow merge branches selectively. It isn't necessarily obvious that "Observe" doesn't mean "merge/union", since the reasons it can't in the general case are somewhat subtle (conflicts between refs with the same names, detecting ref deletion).

Test Plan:
Read documentation. Hit the error locally by trying to "Observe" while in Read/Write mode:

{F5302655}

Reviewers: amckinley

Reviewed By: amckinley

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

Details

Provenance
epriestleyAuthored on Nov 30 2017, 12:13 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPf786c86a6a42: Don't require the "gd" extension be installed in order to run unit tests
Branches
Unknown
Tags
Unknown

Event Timeline