Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F109612692
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 22, 16:46
Size
871 B
Mime Type
text/x-php
Expires
Thu, Apr 24, 16:46 (2 d)
Engine
blob
Format
Raw Data
Handle
25740163
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