Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106813360
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
Tue, Apr 1, 00:52
Size
871 B
Mime Type
text/x-php
Expires
Thu, Apr 3, 00:52 (2 d)
Engine
blob
Format
Raw Data
Handle
25239596
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