当前位置: 首页>>代码示例>>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;未经允许,请勿转载。