Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109629905
DiffusionSubversionCommandEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Apr 22, 19:03
Size
1 KB
Mime Type
text/x-php
Expires
Thu, Apr 24, 19:03 (2 h, 29 m)
Engine
blob
Format
Raw Data
Handle
25653611
Attached To
rPH Phabricator
DiffusionSubversionCommandEngine.php
View Options
<?php
final
class
DiffusionSubversionCommandEngine
extends
DiffusionCommandEngine
{
protected
function
canBuildForRepository
(
PhabricatorRepository
$repository
)
{
return
$repository
->
isSVN
();
}
protected
function
newFormattedCommand
(
$pattern
,
array
$argv
)
{
$flags
=
array
();
$args
=
array
();
$flags
[]
=
'--non-interactive'
;
if
(
$this
->
isAnyHTTPProtocol
()
||
$this
->
isSVNProtocol
())
{
$flags
[]
=
'--no-auth-cache'
;
if
(
$this
->
isAnyHTTPProtocol
())
{
$flags
[]
=
'--trust-server-cert'
;
}
$credential_phid
=
$this
->
getCredentialPHID
();
if
(
$credential_phid
)
{
$key
=
PassphrasePasswordKey
::
loadFromPHID
(
$credential_phid
,
PhabricatorUser
::
getOmnipotentUser
());
$flags
[]
=
'--username %P'
;
$args
[]
=
$key
->
getUsernameEnvelope
();
$flags
[]
=
'--password %P'
;
$args
[]
=
$key
->
getPasswordEnvelope
();
}
}
$flags
=
implode
(
' '
,
$flags
);
$pattern
=
"svn {$flags} {$pattern}"
;
return
array
(
$pattern
,
array_merge
(
$args
,
$argv
));
}
protected
function
newCustomEnvironment
()
{
$env
=
array
();
if
(
$this
->
isAnySSHProtocol
())
{
$env
[
'SVN_SSH'
]
=
$this
->
getSSHWrapper
();
}
return
$env
;
}
}
Event Timeline
Log In to Comment