Page MenuHomestyx hydra

DiffusionMercurialRawDiffQuery.php
No OneTemporary

DiffusionMercurialRawDiffQuery.php

<?php
final class DiffusionMercurialRawDiffQuery extends DiffusionRawDiffQuery {
protected function executeQuery() {
return $this->executeRawDiffCommand();
}
protected function executeRawDiffCommand() {
$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);
$this->configureFuture($future);
list($raw_diff) = $future->resolvex();
return $raw_diff;
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, Feb 24, 8:30 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
837641
Default Alt Text
DiffusionMercurialRawDiffQuery.php (1 KB)

Event Timeline