HomePhorge

Add a safety check to commit discovery daemon

Description

Add a safety check to commit discovery daemon

Summary:
Although I couldn't repro the issue in T692, I did manage to point the "Diviner"
repository at the "Phabricator" working copy and screw some stuff up on
secure.phabricator.com.

Before discovering commits in a repository, ensure the 'origin' remote points at
the configured URI. This prevents issues where the working copy gets configured
to point at an existing (but incorrect) checkout.

Test Plan:

  • Ran gitcommitdiscovery daemon normally under "phd debug", saw it execute the

"remote show -n" command and then start working.

  • Intentionally botched the config, got an exception:

    (Exception) Working copy '/INSECURE/repos/phabricator' has origin URL 'ssh://git@github.com/facebook/phabricator.git', but the configured URL 'git://github.com/facebook/diviner.git' is expected. Refusing to proceed.

Reviewers: btrahan, jungejason

Reviewed By: jungejason

CC: aran, jungejason

Maniphest Tasks: T692

Differential Revision: 1253

Details

Provenance
epriestleyAuthored on Dec 20 2011, 5:48 PM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPbd3c2355e8e2: Match usernames in any case in commit message object lists (CC, Reviewers, etc.)
Branches
Unknown
Tags
Unknown

Event Timeline