當前位置: 首頁>>代碼示例>>PHP>>正文


PHP PhabricatorRepositoryCommit::getMonogram方法代碼示例

本文整理匯總了PHP中PhabricatorRepositoryCommit::getMonogram方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorRepositoryCommit::getMonogram方法的具體用法?PHP PhabricatorRepositoryCommit::getMonogram怎麽用?PHP PhabricatorRepositoryCommit::getMonogram使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PhabricatorRepositoryCommit的用法示例。


在下文中一共展示了PhabricatorRepositoryCommit::getMonogram方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: newDiffFromCommit

 public function newDiffFromCommit(PhabricatorRepositoryCommit $commit)
 {
     $viewer = $this->getViewer();
     $repository = $commit->getRepository();
     $identifier = $commit->getCommitIdentifier();
     $monogram = $commit->getMonogram();
     $drequest = DiffusionRequest::newFromDictionary(array('user' => $viewer, 'repository' => $repository));
     $raw_diff = DiffusionQuery::callConduitWithDiffusionRequest($viewer, $drequest, 'diffusion.rawdiffquery', array('commit' => $identifier));
     // TODO: Support adds, deletes and moves under SVN.
     if (strlen($raw_diff)) {
         $changes = id(new ArcanistDiffParser())->parseDiff($raw_diff);
     } else {
         // This is an empty diff, maybe made with `git commit --allow-empty`.
         // NOTE: These diffs have the same tree hash as their ancestors, so
         // they may attach to revisions in an unexpected way. Just let this
         // happen for now, although it might make sense to special case it
         // eventually.
         $changes = array();
     }
     $diff = DifferentialDiff::newFromRawChanges($viewer, $changes)->setRepositoryPHID($repository->getPHID())->setCreationMethod('commit')->setSourceControlSystem($repository->getVersionControlSystem())->setLintStatus(DifferentialLintStatus::LINT_AUTO_SKIP)->setUnitStatus(DifferentialUnitStatus::UNIT_AUTO_SKIP)->setDateCreated($commit->getEpoch())->setDescription($monogram);
     $author_phid = $this->getAuthorPHID();
     if ($author_phid !== null) {
         $diff->setAuthorPHID($author_phid);
     }
     $parents = DiffusionQuery::callConduitWithDiffusionRequest($viewer, $drequest, 'diffusion.commitparentsquery', array('commit' => $identifier));
     if ($parents) {
         $diff->setSourceControlBaseRevision(head($parents));
     }
     // TODO: Attach binary files.
     return $diff->save();
 }
開發者ID:truSense,項目名稱:phabricator,代碼行數:31,代碼來源:DifferentialDiffExtractionEngine.php

示例2: parseCommit

 protected function parseCommit(PhabricatorRepository $repository, PhabricatorRepositoryCommit $commit)
 {
     $this->log("%s\n", pht('Parsing "%s"...', $commit->getMonogram()));
     if ($this->isBadCommit($commit)) {
         $this->log(pht('This commit is marked bad!'));
         return;
     }
     $results = $this->parseCommitChanges($repository, $commit);
     if ($results) {
         $this->writeCommitChanges($repository, $commit, $results);
     }
     $this->finishParse();
 }
開發者ID:truSense,項目名稱:phabricator,代碼行數:13,代碼來源:PhabricatorRepositoryCommitChangeParserWorker.php

示例3: parseCommit

 protected function parseCommit(PhabricatorRepository $repository, PhabricatorRepositoryCommit $commit)
 {
     $this->log("%s\n", pht('Parsing "%s"...', $commit->getMonogram()));
     if ($this->isBadCommit($commit)) {
         $this->log(pht('This commit is marked bad!'));
         return;
     }
     if (!$this->shouldSkipImportStep()) {
         $results = $this->parseCommitChanges($repository, $commit);
         if ($results) {
             $this->writeCommitChanges($repository, $commit, $results);
         }
         $commit->writeImportStatusFlag($this->getImportStepFlag());
         PhabricatorSearchWorker::queueDocumentForIndexing($commit->getPHID());
     }
     $this->finishParse();
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:17,代碼來源:PhabricatorRepositoryCommitChangeParserWorker.php

示例4: isBadCommit

 protected function isBadCommit(PhabricatorRepositoryCommit $commit)
 {
     $repository = new PhabricatorRepository();
     $bad_commit = queryfx_one($repository->establishConnection('w'), 'SELECT * FROM %T WHERE fullCommitName = %s', PhabricatorRepository::TABLE_BADCOMMIT, $commit->getMonogram());
     return (bool) $bad_commit;
 }
開發者ID:rchicoli,項目名稱:phabricator,代碼行數:6,代碼來源:PhabricatorRepositoryCommitParserWorker.php

示例5: getMailThreading

 public static function getMailThreading(PhabricatorRepository $repository, PhabricatorRepositoryCommit $commit)
 {
     return array('diffusion-audit-' . $commit->getPHID(), pht('Commit %s', $commit->getMonogram()));
 }
開發者ID:truSense,項目名稱:phabricator,代碼行數:4,代碼來源:PhabricatorAuditCommentEditor.php


注:本文中的PhabricatorRepositoryCommit::getMonogram方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。