mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
Remove last vestiges of Lua hooks from tests
Summary: For Lua hooks, we needed to know whether to run the hook per file, or per changeset. Rust hooks know this implicitly, as they're built-in to the server. Stop having the tests set an unnecessary config Reviewed By: krallin Differential Revision: D22282799 fbshipit-source-id: c9f6f6325823d06d03341f04ecf7152999fcdbe7
This commit is contained in:
parent
b7b5c9e7cc
commit
7e9b8dd9e9
@ -827,9 +827,8 @@ CONFIG
|
||||
|
||||
function register_hook {
|
||||
hook_name="$1"
|
||||
hook_type="$2"
|
||||
|
||||
shift 2
|
||||
|
||||
shift 1
|
||||
EXTRA_CONFIG_DESCRIPTOR=""
|
||||
if [[ $# -gt 0 ]]; then
|
||||
EXTRA_CONFIG_DESCRIPTOR="$1"
|
||||
@ -841,7 +840,6 @@ function register_hook {
|
||||
hook_name="$hook_name"
|
||||
[[hooks]]
|
||||
name="$hook_name"
|
||||
hook_type="$hook_type"
|
||||
CONFIG
|
||||
[ -n "$EXTRA_CONFIG_DESCRIPTOR" ] && cat "$EXTRA_CONFIG_DESCRIPTOR"
|
||||
) >> "repos/$REPONAME/server.toml"
|
||||
@ -1223,15 +1221,14 @@ name="$HOOKBOOKMARK"
|
||||
CONFIG
|
||||
|
||||
HOOK_NAME="$1"
|
||||
HOOK_TYPE="$2"
|
||||
shift 2
|
||||
shift 1
|
||||
EXTRA_CONFIG_DESCRIPTOR=""
|
||||
if [[ $# -gt 0 ]]; then
|
||||
EXTRA_CONFIG_DESCRIPTOR="$1"
|
||||
fi
|
||||
|
||||
|
||||
register_hook "$HOOK_NAME" "$HOOK_TYPE" "$EXTRA_CONFIG_DESCRIPTOR"
|
||||
register_hook "$HOOK_NAME" "$EXTRA_CONFIG_DESCRIPTOR"
|
||||
|
||||
setup_common_hg_configs
|
||||
cd "$TESTTMP" || exit 1
|
||||
|
@ -15,7 +15,7 @@ setup configuration
|
||||
> name="master_bookmark"
|
||||
> CONFIG
|
||||
|
||||
$ register_hook limit_filesize PerAddedOrModifiedFile <(
|
||||
$ register_hook limit_filesize <(
|
||||
> cat <<CONF
|
||||
> bypass_commit_string="@allow_large_files"
|
||||
> config_ints={filesizelimit=10}
|
||||
|
@ -31,7 +31,6 @@
|
||||
> hook_name="deny_files"
|
||||
> [[hooks]]
|
||||
> name="deny_files"
|
||||
> hook_type="PerAddedOrModifiedFile"
|
||||
> CONFIG
|
||||
$ start_large_small_repo --local-configerator-path="$TESTTMP/configerator"
|
||||
Starting Mononoke server
|
||||
|
@ -22,7 +22,7 @@ setup configuration
|
||||
> name="master_bookmark"
|
||||
> CONFIG
|
||||
|
||||
$ register_hook always_fail_changeset PerChangeset <(
|
||||
$ register_hook always_fail_changeset <(
|
||||
> echo 'bypass_pushvar="BYPASS_REVIEW=true"'
|
||||
> )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user