diff --git a/src/applications/diffusion/query/history/DiffusionMercurialHistoryQuery.php b/src/applications/diffusion/query/history/DiffusionMercurialHistoryQuery.php index 244c54f0a1..a72c15192e 100644 --- a/src/applications/diffusion/query/history/DiffusionMercurialHistoryQuery.php +++ b/src/applications/diffusion/query/history/DiffusionMercurialHistoryQuery.php @@ -44,11 +44,11 @@ final class DiffusionMercurialHistoryQuery extends DiffusionHistoryQuery { } 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', ($this->getOffset() + $this->getLimit()), // No '--skip' in Mercurial. $branch_arg, - $commit_hash, + hgsprintf('reverse(%s::%s)', '0', $commit_hash), $path_arg); $lines = explode("\n", trim($stdout)); diff --git a/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php b/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php index 9a8e648e66..e0a40e76c7 100644 --- a/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php +++ b/src/applications/diffusion/query/lastmodified/DiffusionMercurialLastModifiedQuery.php @@ -10,9 +10,9 @@ final class DiffusionMercurialLastModifiedQuery $path = $drequest->getPath(); list($hash) = $repository->execxLocalCommand( - 'log --template %s --limit 1 --rev %s::0 -- %s', + 'log --template %s --limit 1 --rev %s -- %s', '{node}', - $drequest->getCommit(), + hgsprintf('reverse(%s::%s)', '0', $drequest->getCommit()), nonempty(ltrim($path, '/'), '.')); $commit = id(new PhabricatorRepositoryCommit())->loadOneWhere(