]> khamidou — GitHub mirrors - arcanist.git/commit
Add hook for runtime config settings.
authordurham <durham@fb.com>
Mon, 1 Apr 2013 18:26:17 +0000 (11:26 -0700)
committerdurham <durham@fb.com>
Mon, 1 Apr 2013 18:26:17 +0000 (11:26 -0700)
commit3f2c6b629fc0fb6d41ac8511a125fc1c4477c0a1
tree0f3ac5f3b1a251a6bddffa3651ca3789c66ff045
parentb7a2766130444827ad66cc3c8e8f81837bcfbb68
Add hook for runtime config settings.

Summary:
This adds a hook to allow external parties to provide config settings at runtime.
The hook is technically for when a RepositoryAPI is created, but that moment can
be used to set new config settings using the new setRuntimeConfig() api.

For example you could have a external hook that looks for keys like 'git:foo.bar'
or 'hg:foo.bar' and writes the value of 'foo.bar' based on whether the repo is a
git or a hg repo.

Test Plan:
Created a hook that looks for hg/git prefix versions of config keys.
Set hg:arc.feature.start.default to be "master" and set arc.feature.start.default
to be "trunk".
Ran arc feature in the hg repo.  It made a bookmark on master.
Ran arc feature in the git repo.  It made a branch on trunk.

Did it again, but with git:arc.feature... set instead.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, wez, aran, Korvin
Differential Revision: https://secure.phabricator.com/D5357
src/workingcopyidentity/ArcanistWorkingCopyIdentity.php