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


Java NoFilepatternException类代码示例

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


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

示例1: call

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
public Git call(final GitOperationsStep gitOperationsStep, Git git,
    CredentialsProvider cp, String gitRepoUrl, File gitRepoFolder)
    throws IllegalArgumentException, IOException,
    NoFilepatternException, GitAPIException {

  CheckoutCommand cc = git.checkout().setAllPaths(this.allPaths)
      .setForce(this.force);
  if (!Const.isEmpty(this.path)) {
    cc = cc.addPath(gitOperationsStep.environmentSubstitute(this.path));
  }
  if (!Const.isEmpty(this.name)) {
    cc = cc.setName(gitOperationsStep.environmentSubstitute(this.name));
  }
  if (!Const.isEmpty(this.startPoint)) {
    cc = cc.setStartPoint(gitOperationsStep
        .environmentSubstitute(this.startPoint));
  }

  cc.call();

  return git;
}
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:23,代码来源:CheckoutGitCommand.java

示例2: updateProjectRef

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
public static void updateProjectRef(ObjectId treeId, ObjectInserter objectInserter, Repository repository, CurrentUser currentUser)
        throws IOException, NoFilepatternException, GitAPIException {
    // Create a branch
    Ref gerritCiRef = repository.getRef("refs/meta/gerrit-ci");
    CommitBuilder commitBuilder = new CommitBuilder();
    commitBuilder.setTreeId(treeId);
    logger.info("treeId: " + treeId);

    if (gerritCiRef != null) {
        ObjectId prevCommit = gerritCiRef.getObjectId();
        logger.info("prevCommit: " + prevCommit);
        commitBuilder.setParentId(prevCommit);
    }
    // build commit
    logger.info("Adding git tree : " + treeId);
    commitBuilder.setMessage("Modify project build rules.");
    final IdentifiedUser iUser = (IdentifiedUser) currentUser;
    PersonIdent user = new PersonIdent(currentUser.getUserName(), iUser.getEmailAddresses().iterator().next());
    commitBuilder.setAuthor(user);
    commitBuilder.setCommitter(user);
    ObjectId commitId = objectInserter.insert(commitBuilder);
    objectInserter.flush();
    logger.info(" Making new commit: " + commitId);
    RefUpdate newRef = repository.updateRef("refs/meta/gerrit-ci");
    newRef.setNewObjectId(commitId);
    newRef.update();
    repository.close();
}
 
开发者ID:palantir,项目名称:gerrit-ci,代码行数:29,代码来源:JobsServlet.java

示例3: call

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
public Git call(final GitOperationsStep gitOperationsStep, Git git,
    CredentialsProvider cp, String gitRepoUrl, File gitRepoFolder)
    throws IllegalArgumentException, IOException,
    NoFilepatternException, GitAPIException {

  AddCommand ac = git.add();

  if (!Const.isEmpty(this.filepattern)) {
    ac = ac.addFilepattern(gitOperationsStep
        .environmentSubstitute(this.filepattern));
  }

  ac.setUpdate(update).call();
  return git;
}
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:16,代码来源:AddGitCommand.java

示例4: call

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
public List<String[]> call(final GitInfoStep gitInfoStep, Git git,
    CredentialsProvider cp, String gitRepoUrl, File gitRepoFolder)
    throws IllegalArgumentException, IOException,
    NoFilepatternException, GitAPIException {

  final List<String[]> resp = new ArrayList<String[]>();

  final String[] branch = new String[] {git.getRepository().getBranch()};
  resp.add(branch);

  return resp;
}
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:13,代码来源:CurrentBranchGitCommand.java

示例5: copyDefaultTemplate

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的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

示例6: testStableIsDirty

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
@Test
public void testStableIsDirty() throws NoFilepatternException, IOException,
        GitAPIException {
    tag("0.1.0");
    dirtyRepo();
    Assert.assertEquals(
            "0.1.0+dirty",
            versionFactory.createVersion(repo, null).toString());
}
 
开发者ID:palantir,项目名称:gradle-gitsemver,代码行数:10,代码来源:TagBasedVersionFactoryTest.java

示例7: call

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
Git call(final GitOperationsStep gitOperationsStep, Git git,
CredentialsProvider cp, String gitRepoUrl, File gitRepoFolderPath)
throws IllegalArgumentException, IOException,
NoFilepatternException, GitAPIException;
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:5,代码来源:GitOperationsCommand.java

示例8: call

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
public List<String[]> call(final GitInfoStep gitInfoStep, Git git,
    CredentialsProvider cp, String gitRepoUrl, File gitRepoFolder)
    throws IllegalArgumentException, IOException,
    NoFilepatternException, GitAPIException {

  final List<String[]> tags = new ArrayList<String[]>();

  final List<Ref> refTags = git.tagList().call();
  for (Ref refTag : refTags) {

    final String[] tag = new String[] {null, null, null, null, null,
        null, null, null, null, null};

    tag[0] = refTag.getObjectId().getName(); // Id
    tag[1] = refTag.getName(); // Name

    final RevObject object = new RevWalk(git.getRepository())
        .parseAny(refTag.getObjectId());
    if (object instanceof RevCommit) {
      tag[2] = ((RevCommit) object).getFullMessage(); // Commit
      // message
      tag[3] = ((RevCommit) object).getShortMessage(); // Commit
      // message
      tag[4] = dt.format(((RevCommit) object).getAuthorIdent()
          .getWhen()); // Author Date
      tag[5] = ((RevCommit) object).getAuthorIdent().getName(); // Author
      // name
      tag[6] = ((RevCommit) object).getAuthorIdent()
          .getEmailAddress(); // Author email
      tag[7] = dt.format(((RevCommit) object).getCommitterIdent()
          .getWhen()); // Committer Date
      tag[8] = ((RevCommit) object).getCommitterIdent().getName(); // Committer
      // name
      tag[9] = ((RevCommit) object).getCommitterIdent()
          .getEmailAddress(); // Committer email
    }

    tags.add(tag);

  }

  return tags;
}
 
开发者ID:ivylabs,项目名称:ivy-pdi-git-steps,代码行数:44,代码来源:ListTagsGitCommand.java

示例9: addFile

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
private void addFile(String path, String content) throws IOException, NoFilepatternException, GitAPIException{
	File absoluteFile = new File(temporaryFolder.getRoot(), path);
	FileUtils.write(absoluteFile, content);
	git.add().addFilepattern(path).call();
}
 
开发者ID:devhub-tud,项目名称:git-server,代码行数:6,代码来源:RepositoryFacadeTest.java

示例10: deleteFile

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
private void deleteFile(String path) throws IOException, NoFilepatternException, GitAPIException{
	git.rm().addFilepattern(path).call();
}
 
开发者ID:devhub-tud,项目名称:git-server,代码行数:4,代码来源:RepositoryFacadeTest.java

示例11: dirtyRepo

import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
private void dirtyRepo() throws IOException, NoFilepatternException,
        GitAPIException {
    new File(repo.getDirectory().getParent(), "hello.txt").createNewFile();
    git.add().addFilepattern("hello.txt").call();
}
 
开发者ID:palantir,项目名称:gradle-gitsemver,代码行数:6,代码来源:TagBasedVersionFactoryTest.java


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