From 7ef47d3e15c92c256d7c63c75abcee1387a5977d Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 16 Feb 2011 10:06:44 -0800 Subject: [PATCH] More SVN hook docs. Summary: Test Plan: Reviewers: CC: --- src/docs/svn_hooks.diviner | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/docs/svn_hooks.diviner b/src/docs/svn_hooks.diviner index c01fe283..3605299f 100644 --- a/src/docs/svn_hooks.diviner +++ b/src/docs/svn_hooks.diviner @@ -11,9 +11,25 @@ engines. To install Arcanist as a pre-commit hook, add this to your svn/hooks/pre-commit: #!/bin/sh - /path/to/arcanist/bin/arc svn-hook-pre-commit $@ 1>&2 + /usr/local/bin/php -f /path/to/arcanist/bin/arc svn-hook-pre-commit $@ 1>&2 Make sure you make this file executable, or you'll get an error for every commit -with an unhelpful error message. You also need to specify the full path since -SVN nukes ENV before executing scripts. +with an unhelpful error message. You also need to specify the full path to PHP +since SVN nukes ENV before executing scripts. Alternatively you can specify +PATH explicitly. +If your project is configured to run linters or lint engines which aren't part +of Arcanist, specify where to load them from with ##--load-phutil-library##: + + --load-phutil-library=/path/to/library/root + +Since SVN commit hooks run without access to a working copy, you'll need to keep +one checked out somewhere and reference it with ##--load-phutil-library## if you +build new linters or customize lint engines. For example, your hook might +look like this: + + #!/bin/sh + /usr/local/bin/php -f /path/to/arcanist/bin/arc svn-hook-pre-commit \ + --load-phutil-library=/path/to/custom/lint/engine \ + --load-phutil-library=/path/to/custom/unittest/engine \ + $@ 1>&2