Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F77005484
DiffusionMercurialRawDiffQuery.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
Sun, Aug 11, 17:53
Size
871 B
Mime Type
text/x-php
Expires
Tue, Aug 13, 17:53 (2 d)
Engine
blob
Format
Raw Data
Handle
19810458
Attached To
rPH Phabricator
DiffusionMercurialRawDiffQuery.php
View Options
<?php
final
class
DiffusionMercurialRawDiffQuery
extends
DiffusionRawDiffQuery
{
protected
function
newQueryFuture
()
{
$drequest
=
$this
->
getRequest
();
$repository
=
$drequest
->
getRepository
();
$commit
=
$this
->
getAnchorCommit
();
// If there's no path, get the entire raw diff.
$path
=
nonempty
(
$drequest
->
getPath
(),
'.'
);
$against
=
$this
->
getAgainstCommit
();
if
(
$against
===
null
)
{
// If `$commit` has no parents (usually because it's the first commit
// in the repository), we want to diff against `null`. This revset will
// do that for us automatically.
$against
=
'('
.
$commit
.
'^ or null)'
;
}
$future
=
$repository
->
getLocalCommandFuture
(
'diff -U %d --git --rev %s --rev %s -- %s'
,
$this
->
getLinesOfContext
(),
$against
,
$commit
,
$path
);
return
$future
;
}
}
Event Timeline
Log In to Comment