• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NoMessageException类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.jgit.api.errors.NoMessageException的典型用法代码示例。如果您正苦于以下问题:Java NoMessageException类的具体用法?Java NoMessageException怎么用?Java NoMessageException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NoMessageException类属于org.eclipse.jgit.api.errors包,在下文中一共展示了NoMessageException类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: doHandle

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
private OneShotEvent doHandle(MergeRequestHookTriggerHandler mergeRequestHookTriggerHandler,
		MergeRequestObjectAttributesBuilder objectAttributes) throws GitAPIException, IOException, NoHeadException,
		NoMessageException, UnmergedPathsException, ConcurrentRefUpdateException, WrongRepositoryStateException,
		AmbiguousObjectException, IncorrectObjectTypeException, MissingObjectException, InterruptedException {
	Git.init().setDirectory(tmp.getRoot()).call();
       tmp.newFile("test");
       Git git = Git.open(tmp.getRoot());
       git.add().addFilepattern("test");
       RevCommit commit = git.commit().setMessage("test").call();
       ObjectId head = git.getRepository().resolve(Constants.HEAD);
       String repositoryUrl = tmp.getRoot().toURI().toString();

       final OneShotEvent buildTriggered = new OneShotEvent();
       FreeStyleProject project = jenkins.createFreeStyleProject();
       project.setScm(new GitSCM(repositoryUrl));
       project.getBuildersList().add(new TestBuilder() {
           @Override
           public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
               buildTriggered.signal();
               return true;
           }
       });
       project.setQuietPeriod(0);
	mergeRequestHookTriggerHandler.handle(project, mergeRequestHook()
               .withObjectAttributes(objectAttributes
           		    .withTargetBranch("refs/heads/" + git.nameRev().add(head).call().get(head))
           		    .withLastCommit(commit().withAuthor(user().withName("test").build()).withId(commit.getName()).build())
                   .build())
               .withProject(project()
                   .withWebUrl("https://gitlab.org/test.git")
                   .build()
               )
               .build(), true, BranchFilterFactory.newBranchFilter(branchFilterConfig().build(BranchFilterType.All)),
           newMergeRequestLabelFilter(null));

       buildTriggered.block(10000);
       return buildTriggered;
}
 
开发者ID:jenkinsci,项目名称:gitlab-plugin,代码行数:39,代码来源:MergeRequestHookTriggerHandlerImplTest.java


示例2: call

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
public Git call(final GitOperationsStep gitOperationsStep, Git git,
    CredentialsProvider cp, String gitRepoUrl, File gitRepoFolder)
    throws IllegalArgumentException, IOException, NoHeadException,
    NoMessageException, UnmergedPathsException,
    ConcurrentRefUpdateException, WrongRepositoryStateException,
    GitAPIException {
  CommitCommand cc = git
      .commit()
      .setAuthor(
          gitOperationsStep
              .environmentSubstitute(this.authorName == null ? ""
                  : this.authorName),
          gitOperationsStep
              .environmentSubstitute(this.authorEmail == null ? ""
                  : this.authorEmail))
      .setCommitter(
          gitOperationsStep
              .environmentSubstitute(this.committerName == null ? ""
                  : this.committerName),
          gitOperationsStep
              .environmentSubstitute(this.committerEmail == null ? ""
                  : this.committerName));

  if (!Const.isEmpty(this.commitMessage)) {
    cc = cc.setMessage(gitOperationsStep
        .environmentSubstitute(this.commitMessage));
  }
  cc.setAll(all).setInsertChangeId(insertChangeId).setAmend(amend).call();
  return git;
}
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:31,代码来源:CommitGitCommand.java


示例3: copyDefaultTemplate

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
private Git copyDefaultTemplate(File tmpDir) throws URISyntaxException, IOException, NoFilepatternException,
		NoHeadException, NoMessageException, UnmergedPathException, ConcurrentRefUpdateException,
		WrongRepositoryStateException {
	Git git;

	copySkeleton(tmpDir);

	git = Git.init().setDirectory(tmpDir).call();
	git.add().addFilepattern(".").call();
	git.commit().setCommitter("DevHub", "[email protected]").setMessage("Initial commit").call();
	log.debug("Initialized git repo with default template");
	return git;
}
 
开发者ID:devhub-tud,项目名称:devhub-prototype,代码行数:14,代码来源:GitRepositoryUtils.java


示例4: createVersionFactory

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
@Before
public void createVersionFactory() throws IOException, NoHeadException,
        NoMessageException, UnmergedPathsException,
        ConcurrentRefUpdateException, WrongRepositoryStateException,
        GitAPIException {
    repo = createRepository();
    git = initializeGitFlow(repo);
    versionFactory = new TagBasedVersionFactory();
}
 
开发者ID:palantir,项目名称:gradle-gitsemver,代码行数:10,代码来源:TagBasedVersionFactoryTest.java


示例5: testCommitCount

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
@Test
public void testCommitCount() throws NoHeadException, NoMessageException,
        UnmergedPathsException, ConcurrentRefUpdateException,
        WrongRepositoryStateException, GitAPIException,
        NoWorkTreeException, IOException {
    tag("v0.1.1-rc");
    makeCommit();
    makeCommit();
    RevCommit head = makeCommit();
    validateUnstable("0.1.1-rc", 3, head, Dirty.NO, DOT);
}
 
开发者ID:palantir,项目名称:gradle-gitsemver,代码行数:12,代码来源:TagBasedVersionFactoryTest.java


示例6: commit

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
public static void commit(Repo repo, boolean stageAll, boolean isAmend,
        String msg, String authorName, String authorEmail) throws Exception, NoHeadException, NoMessageException,
        UnmergedPathsException, ConcurrentRefUpdateException,
        WrongRepositoryStateException, GitAPIException, StopTaskException {
    Context context = SGitApplication.getContext();
    StoredConfig config = repo.getGit().getRepository().getConfig();
    String committerEmail = config.getString("user", null, "email");
    String committerName = config.getString("user", null, "name");

    if (committerName == null || committerName.equals("")) {
        committerName = Profile.getUsername(context);
    }
    if (committerEmail == null || committerEmail.equals("")) {
        committerEmail = Profile.getEmail(context);
    }
    if (committerName.isEmpty() || committerEmail.isEmpty()) {
        throw new Exception("Please set your name and email");
    }
    if (msg.isEmpty()) {
        throw new Exception("Please include a commit message");
    }
    CommitCommand cc = repo.getGit().commit()
            .setCommitter(committerName, committerEmail).setAll(stageAll)
            .setAmend(isAmend).setMessage(msg);
    if (authorName != null && authorEmail != null) {
        cc.setAuthor(authorName, authorEmail);
    }
    cc.call();
    repo.updateLatestCommitInfo();
}
 
开发者ID:sheimi,项目名称:SGit,代码行数:31,代码来源:CommitChangesTask.java


示例7: makeCommit

import org.eclipse.jgit.api.errors.NoMessageException; //导入依赖的package包/类
private RevCommit makeCommit() throws NoHeadException, NoMessageException,
        UnmergedPathsException, ConcurrentRefUpdateException,
        WrongRepositoryStateException, GitAPIException {
    return git.commit().setCommitter(COMMITTER).setMessage("some commit").call();
}
 
开发者ID:palantir,项目名称:gradle-gitsemver,代码行数:6,代码来源:TagBasedVersionFactoryTest.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractJavaGenerator类代码示例发布时间:2022-05-22
下一篇:
Java OutputObject类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap