Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
PHP
123456789101112131415161718192021222324252627282930313233<?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 = hgsprintf('(%s^ or null)', $commit); }
$future = $repository->getLocalCommandFuture( 'diff -U %d --git --rev %s --rev %s -- %s', $this->getLinesOfContext(), $against, hgsprintf('%s', $commit), $path);
return $future; }
}