Homec4science

Fix arcanist documentation to include "set -e" in example SVN hooks

Authored by epriestley <git@epriestley.com> on Aug 26 2011, 20:29.

Description

Fix arcanist documentation to include "set -e" in example SVN hooks

Summary: "set -e" causes the script to exit if any command returns nonzero.
Without it, we incorrectly discard the failure code. At Facebook everything runs
in "set -e" or some equivalent so I never picked this up in testing.

Test Plan:
Added the hook to my svn local, it blocked bad commits and allowed good ones.

>>> orbital:~/devtools/svnroot $ svn commit -m "quaa"
Sending        test.php
Transmitting file data .svn: Commit failed (details follow):
svn: Commit blocked by pre-commit hook (exit code 1) with output:

LINT ERRORS

This changeset has lint errors. You must fix all lint errors before you can
commit.

You can add '@bypass-lint' to your commit message to disable lint checks for
this commit, or '@nolint' to the file with errors to disable lint for that
file.

>>> Lint for test.php:

   Error  (XHP1) PHP Syntax Error!
    This file contains a syntax error: XHPAST Parse Error: syntax error,
    unexpected '}' on line 1

    >>>        1 <?php asdddddd;!}}

Reviewers: svemir, jungejason, tuomaspelkonen, aran

Reviewed By: svemir

CC: aran, svemir, epriestley

Differential Revision: 864

Details

Committed
epriestley <git@epriestley.com>Aug 26 2011, 20:51
Pushed
aubortJan 31 2017, 17:16
Parents
rPHf4e25b7a35df: Sync Phabricator to Javelin HEAD
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH99b9ceb6d774: Fix arcanist documentation to include "set -e" in example SVN hooks (authored by epriestley <git@epriestley.com>).Aug 26 2011, 20:51