Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3281934
ArcanistGitWorkEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
ArcanistGitWorkEngine.php
View Options
<?php
final
class
ArcanistGitWorkEngine
extends
ArcanistWorkEngine
{
protected
function
getDefaultStartSymbol
(
)
{
$api
=
$this
->
getRepositoryAPI
(
)
;
// NOTE: In Git, we're trying to find the current branch name because the
// behavior of "--track" depends on the symbol we pass.
$marker
=
$api
->
newMarkerRefQuery
(
)
->
withIsActive
(
true
)
->
withMarkerTypes
(
array
(
ArcanistMarkerRef
::
TYPE_BRANCH
)
)
->
executeOne
(
)
;
if
(
$marker
)
{
return
$marker
->
getName
(
)
;
}
return
$api
->
getWorkingCopyRevision
(
)
;
}
protected
function
newMarker
(
$symbol
,
$start
)
{
$api
=
$this
->
getRepositoryAPI
(
)
;
$log
=
$this
->
getLogEngine
(
)
;
$log
->
writeStatus
(
pht
(
'NEW BRANCH'
)
,
pht
(
'Creating new branch "%s" from "%s".'
,
$symbol
,
$start
)
)
;
$future
=
$api
->
newFuture
(
'checkout --track -b %s %s --'
,
$symbol
,
$start
)
;
$future
->
resolve
(
)
;
}
protected
function
moveToMarker
(
ArcanistMarkerRef
$marker
)
{
$api
=
$this
->
getRepositoryAPI
(
)
;
$log
=
$this
->
getLogEngine
(
)
;
$log
->
writeStatus
(
pht
(
'BRANCH'
)
,
pht
(
'Checking out branch "%s".'
,
$marker
->
getName
(
)
)
)
;
$future
=
$api
->
newFuture
(
'checkout %s --'
,
$marker
->
getName
(
)
)
;
$future
->
resolve
(
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Mar 24, 02:32 (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1115227
Default Alt Text
ArcanistGitWorkEngine.php (1 KB)
Attached To
Mode
rARC Arcanist
Attached
Detach File
Event Timeline
Log In to Comment