3 final class DiffusionMercurialRawDiffQuery
extends DiffusionRawDiffQuery
{
5 protected function newQueryFuture() {
6 $drequest = $this->getRequest();
7 $repository = $drequest->getRepository();
9 $commit = $this->getAnchorCommit();
11 // If there's no path, get the entire raw diff.
12 $path = nonempty($drequest->getPath(), '.');
14 $against = $this->getAgainstCommit();
15 if ($against === null) {
16 // If `$commit` has no parents (usually because it's the first commit
17 // in the repository), we want to diff against `null`. This revset will
18 // do that for us automatically.
19 $against = hgsprintf('(%s^ or null)', $commit);
22 $future = $repository->getLocalCommandFuture(
23 'diff -U %d --git --rev %s --rev %s -- %s',
24 $this->getLinesOfContext(),
26 hgsprintf('%s', $commit),