当前位置: 首页>>代码示例>>PHP>>正文


PHP PhabricatorRepository::getLocalCommandFuture方法代码示例

本文整理汇总了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;
 }
开发者ID:endlessm,项目名称:phabricator,代码行数:25,代码来源:DiffusionInternalGitRawDiffQueryConduitAPIMethod.php

示例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();
 }
开发者ID:rchicoli,项目名称:phabricator,代码行数:13,代码来源:PhabricatorGitGraphStream.php

示例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();
 }
开发者ID:denghp,项目名称:phabricator,代码行数:8,代码来源:PhabricatorMercurialGraphStream.php

示例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();
 }
开发者ID:nexeck,项目名称:phabricator,代码行数:8,代码来源:PhabricatorGitGraphStream.php

示例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();
 }
开发者ID:nexeck,项目名称:phabricator,代码行数:8,代码来源:PhabricatorMercurialGraphStream.php


注:本文中的PhabricatorRepository::getLocalCommandFuture方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。