Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F21589892
ArcanistSubversionHookAPI.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistSubversionHookAPI.php
View Options
<?php
/*
* Copyright 2011 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.
*/
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
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 9, 13:31 (12 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1182179
Default Alt Text
ArcanistSubversionHookAPI.php (1 KB)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline