本文整理汇总了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;
}
示例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();
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}
示例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;
示例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;
}
示例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();
}
示例10: deleteFile
import org.eclipse.jgit.api.errors.NoFilepatternException; //导入依赖的package包/类
private void deleteFile(String path) throws IOException, NoFilepatternException, GitAPIException{
git.rm().addFilepattern(path).call();
}
示例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();
}