]> khamidou — GitHub mirrors - arcanist.git/commit
Move some VCS-specific logic into VCS APIs
authorepriestley <git@epriestley.com>
Thu, 15 Sep 2011 01:44:54 +0000 (18:44 -0700)
committerepriestley <git@epriestley.com>
Thu, 15 Sep 2011 14:39:34 +0000 (07:39 -0700)
commit31ec0119225a0556cf53f2c16d1f30337f9e1eaa
treebb0b06914da8ad9e5958465a1eb2f5e07a351aa5
parent9df1b8a4bd4136c0932904a14cb80ed30fcb7d39
Move some VCS-specific logic into VCS APIs

Summary:
We have some git-specific logic on main pathways which should be in the API
class, move it around so "arc lint" with an engine works under Mercurial. This
resovles the error @makinde reported:

> PHP Catchable fatal error:  Argument 1 passed to
ArcanistBaseWorkflow::parseGitRelativeCommit() must be an instance of
ArcanistGitAPI, instance of ArcanistMercurialAPI given, called in
/home/makinde/.arc_install/arcanist/src/workflow/lint/ArcanistLintWorkflow.php
on line 131 and defined in
/home/makinde/.arc_install/arcanist/src/workflow/base/ArcanistBaseWorkflow.php
on line 830

Test Plan: Ran "arc diff" in git and hg working copies, plus "arc lint" with a
configured "lint_engine".

Reviewers: Makinde, aran, jungejason, nh, tuomaspelkonen

Reviewed By: Makinde

CC: aran, Makinde
Differential Revision: 935
src/repository/api/base/ArcanistRepositoryAPI.php
src/repository/api/git/ArcanistGitAPI.php
src/repository/api/git/__init__.php
src/repository/api/mercurial/ArcanistMercurialAPI.php
src/repository/api/subversion/ArcanistSubversionAPI.php
src/workflow/base/ArcanistBaseWorkflow.php
src/workflow/base/__init__.php
src/workflow/diff/ArcanistDiffWorkflow.php
src/workflow/lint/ArcanistLintWorkflow.php