本文整理汇总了PHP中PhabricatorRepository::getLocalCommandFuture方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorRepository::getLocalCommandFuture方法的具体用法?PHP PhabricatorRepository::getLocalCommandFuture怎么用?PHP PhabricatorRepository::getLocalCommandFuture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorRepository
的用法示例。
在下文中一共展示了PhabricatorRepository::getLocalCommandFuture方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getRawDiff
private function getRawDiff(PhabricatorRepository $repository, $commit, $use_log, $try_harder)
{
$flags = array('-n1', '-M', '-C', '-B', '--raw', '-t', '--abbrev=40');
if ($try_harder) {
$flags[] = '--find-copies-harder';
}
if ($use_log) {
// This is the first commit so we need to use "log". We know it's not a
// merge commit because it couldn't be merging anything, so this is safe.
// NOTE: "--pretty=format: " is to disable diff output, we only want the
// part we get from "--raw".
$future = $repository->getLocalCommandFuture('log %Ls --pretty=format: %s', $flags, $commit);
} else {
// Otherwise, we can use "diff", which will give us output for merges.
// We diff against the first parent, as this is generally the expectation
// and results in sensible behavior.
$future = $repository->getLocalCommandFuture('diff %Ls %s^1 %s', $flags, $commit, $commit);
}
// Don't spend more than 30 seconds generating the slower output.
if ($try_harder) {
$future->setTimeout(30);
}
list($raw) = $future->resolvex();
return $raw;
}
示例2: __construct
public function __construct(PhabricatorRepository $repository, $start_commit = null)
{
$this->repository = $repository;
$this->startCommit = $start_commit;
if ($start_commit !== null) {
$future = $repository->getLocalCommandFuture('log --format=%s %s --', '%H%x01%P%x01%ct', $start_commit);
} else {
$future = $repository->getLocalCommandFuture('log --format=%s --all --', '%H%x01%P%x01%ct');
}
$this->iterator = new LinesOfALargeExecFuture($future);
$this->iterator->setDelimiter("\n");
$this->iterator->rewind();
}
示例3: __construct
public function __construct(PhabricatorRepository $repository, $commit)
{
$this->repository = $repository;
$future = $repository->getLocalCommandFuture('log --template %s --rev %s', '{rev}\\1{node}\\1{date}\\1{parents}\\2', hgsprintf('reverse(ancestors(%s))', $commit));
$this->iterator = new LinesOfALargeExecFuture($future);
$this->iterator->setDelimiter("");
$this->iterator->rewind();
}
示例4: __construct
public function __construct(PhabricatorRepository $repository, $start_commit)
{
$this->repository = $repository;
$future = $repository->getLocalCommandFuture("log --format=%s %s --", '%H%x01%P%x01%ct', $start_commit);
$this->iterator = new LinesOfALargeExecFuture($future);
$this->iterator->setDelimiter("\n");
$this->iterator->rewind();
}
示例5: __construct
public function __construct(PhabricatorRepository $repository)
{
$this->repository = $repository;
$future = $repository->getLocalCommandFuture("log --template '{rev}{node}{date}{parents}'");
$this->iterator = new LinesOfALargeExecFuture($future);
$this->iterator->setDelimiter("");
$this->iterator->rewind();
}