mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Use reverse(x::y) instead of y::x in Mercurial history queries
The revset "x:0" works, but the revset "x::0" is empty. We actually want "reverse(0::x)". Auditors: DurhamGoode
This commit is contained in:
parent
e2c9ebdbc1
commit
88497bf7df
2 changed files with 4 additions and 4 deletions
|
@ -44,11 +44,11 @@ final class DiffusionMercurialHistoryQuery extends DiffusionHistoryQuery {
|
||||||
}
|
}
|
||||||
|
|
||||||
list($stdout) = $repository->execxLocalCommand(
|
list($stdout) = $repository->execxLocalCommand(
|
||||||
'log --debug --template %s --limit %d %C --rev %s::0 %C',
|
'log --debug --template %s --limit %d %C --rev %s %C',
|
||||||
'{node};{parents}\\n',
|
'{node};{parents}\\n',
|
||||||
($this->getOffset() + $this->getLimit()), // No '--skip' in Mercurial.
|
($this->getOffset() + $this->getLimit()), // No '--skip' in Mercurial.
|
||||||
$branch_arg,
|
$branch_arg,
|
||||||
$commit_hash,
|
hgsprintf('reverse(%s::%s)', '0', $commit_hash),
|
||||||
$path_arg);
|
$path_arg);
|
||||||
|
|
||||||
$lines = explode("\n", trim($stdout));
|
$lines = explode("\n", trim($stdout));
|
||||||
|
|
|
@ -10,9 +10,9 @@ final class DiffusionMercurialLastModifiedQuery
|
||||||
$path = $drequest->getPath();
|
$path = $drequest->getPath();
|
||||||
|
|
||||||
list($hash) = $repository->execxLocalCommand(
|
list($hash) = $repository->execxLocalCommand(
|
||||||
'log --template %s --limit 1 --rev %s::0 -- %s',
|
'log --template %s --limit 1 --rev %s -- %s',
|
||||||
'{node}',
|
'{node}',
|
||||||
$drequest->getCommit(),
|
hgsprintf('reverse(%s::%s)', '0', $drequest->getCommit()),
|
||||||
nonempty(ltrim($path, '/'), '.'));
|
nonempty(ltrim($path, '/'), '.'));
|
||||||
|
|
||||||
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
$commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(
|
||||||
|
|
Loading…
Reference in a new issue