mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Use "-b", not "--branch", when issuing "hg log" in Phabricator
Summary: Mercurial renamed "--only-branch" to "--branch" about two years ago. "-b" exists in both versions. http://www.selenic.com/pipermail/mercurial-devel/2010-April/020469.html We have a few other cases where we use features that exist only in recent Mercurial (notably, 'ancestors' in log) but we can work around this one easily. Test Plan: Looked at a Mercurial repo in Diffusion, verified that "log -b" commands issued and that the output was correct. Reviewers: btrahan, Makinde, ipalaus Reviewed By: ipalaus CC: aran Maniphest Tasks: T1264 Differential Revision: https://secure.phabricator.com/D2533
This commit is contained in:
parent
3078778fc0
commit
a009c93350
2 changed files with 3 additions and 2 deletions
|
@ -32,8 +32,9 @@ final class DiffusionMercurialHistoryQuery extends DiffusionHistoryQuery {
|
||||||
// in the log).
|
// in the log).
|
||||||
$default_path = '';
|
$default_path = '';
|
||||||
|
|
||||||
|
// NOTE: --branch used to be called --only-branch; use -b for compatibility.
|
||||||
list($stdout) = $repository->execxLocalCommand(
|
list($stdout) = $repository->execxLocalCommand(
|
||||||
'log --debug --template %s --limit %d --branch %s --rev %s:0 -- %s',
|
'log --debug --template %s --limit %d -b %s --rev %s:0 -- %s',
|
||||||
'{node};{parents}\\n',
|
'{node};{parents}\\n',
|
||||||
($this->getOffset() + $this->getLimit()), // No '--skip' in Mercurial.
|
($this->getOffset() + $this->getLimit()), // No '--skip' in Mercurial.
|
||||||
$drequest->getBranch(),
|
$drequest->getBranch(),
|
||||||
|
|
|
@ -27,7 +27,7 @@ final class DiffusionMercurialLastModifiedQuery
|
||||||
|
|
||||||
// TODO: Share some of this with History query.
|
// TODO: Share some of this with History query.
|
||||||
list($hash) = $repository->execxLocalCommand(
|
list($hash) = $repository->execxLocalCommand(
|
||||||
'log --template %s --limit 1 --branch %s --rev %s:0 -- %s',
|
'log --template %s --limit 1 -b %s --rev %s:0 -- %s',
|
||||||
'{node}',
|
'{node}',
|
||||||
$drequest->getBranch(),
|
$drequest->getBranch(),
|
||||||
$drequest->getCommit(),
|
$drequest->getCommit(),
|
||||||
|
|
Loading…
Reference in a new issue