mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-06 04:41:00 +01:00
8fe38f8b6d
Summary: Mark all applicable Arcanist classes as "final", except PhutilLintEngine, which needs a little finesse. @jungejason / @nh, does this break any Facebook stuff? Test Plan: Linter no longer raises warnings. Ran "testEverythingImplemented" in Phabricator. Reviewers: btrahan, jungejason, nh Reviewed By: btrahan CC: aran, epriestley Maniphest Tasks: T795 Differential Revision: https://secure.phabricator.com/D1519
43 lines
1.2 KiB
PHP
43 lines
1.2 KiB
PHP
<?php
|
|
|
|
/*
|
|
* Copyright 2012 Facebook, Inc.
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
/**
|
|
* Interfaces with Subversion while running as a commit hook.
|
|
*/
|
|
final class ArcanistSubversionHookAPI extends ArcanistHookAPI {
|
|
|
|
protected $root;
|
|
protected $transaction;
|
|
protected $repository;
|
|
|
|
public function __construct($root, $transaction, $repository) {
|
|
$this->root = $root;
|
|
$this->transaction = $transaction;
|
|
$this->repository = $repository;
|
|
}
|
|
|
|
public function getCurrentFileData($path) {
|
|
list($err, $file) = exec_manual(
|
|
'svnlook cat --transaction %s %s %s',
|
|
$this->transaction,
|
|
$this->repository,
|
|
$this->root . "/$path");
|
|
|
|
return ($err? null : $file);
|
|
}
|
|
}
|