當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。