]> khamidou — GitHub mirrors - arcanist.git/commit
[arc svn-hook-pre-commit] Access working copy
authorKunal Bhalla <kunalb@fb.com>
Wed, 21 Dec 2011 04:26:05 +0000 (20:26 -0800)
committerKunal Bhalla <kunalb@fb.com>
Thu, 29 Dec 2011 22:28:50 +0000 (14:28 -0800)
commit62e527482b12dce11e9ee2b9f7a1b7874a0ade98
tree556a9f1c5cb815a45bbc85eaaf183bfdf2930f5d
parent7af16f42cdf585e630c8262a6341b19ffb1a4b58
[arc svn-hook-pre-commit] Access working copy

Summary:
Creates a new hook API that can be used to interface with
SVN/Git/Mercurial in the context of a commit hook. Currently only adds a
function to read the modified file data in a Subversion commit hook.

An object of this API is created in the SvnHookPreCommitWorkflow and
passed on the Lint Engine which then uses it to access current file
data, of the way the APIs seem to be structured); linters use the
getData function which is essentially a wrapper around the engine's
call, with another layer of caching.

Task ID: #770556

Blame Rev:

Test Plan:
- Create a local svn repository and add a minimal hook to run the local
  version of arc to test commits

(http://phabricator.com/docs/arcanist/article/Installing_Arcanist_SVN_Hooks.html)
- Create a temporary repository that can trigger any of the linters
  available, and test against a temporary linter by committing against
  the test repository: the linter should be able to access all required
  files by using loadData/getData in the LintEngine and Linter.

Revert Plan:

Tags: lint, svn-hook-pre-commit

Reviewers: jungejason, asukhachev, epriestley, aran

Reviewed By: epriestley

CC: aran, jungejason, epriestley, kunalb, asukhachev
Differential Revision: https://secure.phabricator.com/D1256
src/__phutil_library_map__.php
src/lint/engine/base/ArcanistLintEngine.php
src/lint/linter/base/ArcanistLinter.php
src/lint/linter/base/__init__.php
src/repository/hookapi/base/ArcanistHookAPI.php [new file with mode: 0644]
src/repository/hookapi/base/__init__.php [new file with mode: 0644]
src/repository/hookapi/subversion/ArcanistSubversionHookAPI.php [new file with mode: 0644]
src/repository/hookapi/subversion/__init__.php [new file with mode: 0644]
src/workflow/svn-hook-pre-commit/ArcanistSvnHookPreCommitWorkflow.php
src/workflow/svn-hook-pre-commit/__init__.php