Homec4science

Add a safety check to commit discovery daemon

Authored by epriestley <git@epriestley.com> on Dec 21 2011, 02:48.

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

Committed
epriestley <git@epriestley.com>Dec 21 2011, 04:52
Pushed
aubortJan 31 2017, 17:16
Parents
rPHbd3c2355e8e2: Match usernames in any case in commit message object lists (CC, Reviewers, etc.)
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH92f974177919: Add a safety check to commit discovery daemon (authored by epriestley <git@epriestley.com>).Dec 21 2011, 04:52