Path: blob/master/src/applications/diffusion/query/rawdiff/DiffusionMercurialRawDiffQuery.php
12242 views
<?php12final class DiffusionMercurialRawDiffQuery extends DiffusionRawDiffQuery {34protected function newQueryFuture() {5$drequest = $this->getRequest();6$repository = $drequest->getRepository();78$commit = $this->getAnchorCommit();910// If there's no path, get the entire raw diff.11$path = nonempty($drequest->getPath(), '.');1213$against = $this->getAgainstCommit();14if ($against === null) {15// If `$commit` has no parents (usually because it's the first commit16// in the repository), we want to diff against `null`. This revset will17// do that for us automatically.18$against = hgsprintf('(%s^ or null)', $commit);19}2021$future = $repository->getLocalCommandFuture(22'diff -U %d --git --rev %s --rev %s -- %s',23$this->getLinesOfContext(),24$against,25hgsprintf('%s', $commit),26$path);2728return $future;29}3031}323334