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


Java StopWalkException类代码示例

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


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

示例1: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
public boolean include (RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException {
    if (monitor.isCanceled()) {
        throw StopWalkException.INSTANCE;
    }
    return true;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:CancelRevFilter.java

示例2: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
public boolean include(final RevWalk walker, final RevCommit cmit)
		throws StopWalkException, MissingObjectException,
		IncorrectObjectTypeException, IOException {
	// Since the walker sorts commits by commit time we can be
	// reasonably certain there is nothing remaining worth our
	// scanning if this commit is before the point in question.
	//
	if (cmit.getCommitTime() < when)
		throw StopWalkException.INSTANCE;
	return true;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:13,代码来源:CommitTimeRevFilter.java

示例3: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
public boolean include(RevWalk walker, RevCommit cmit)
		throws StopWalkException, MissingObjectException,
		IncorrectObjectTypeException, IOException {
	count++;
	if (count > maxCount)
		throw StopWalkException.INSTANCE;
	return true;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:10,代码来源:MaxCountRevFilter.java

示例4: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
public boolean include(RevWalk walker, RevCommit cmit)
		throws StopWalkException, MissingObjectException,
		IncorrectObjectTypeException, IOException {
	if (skip > count++)
		return false;
	return true;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:9,代码来源:SkipRevFilter.java

示例5: checkout

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
/**
 * Points to head commit on master branch
 * 
 * @param repositoryFolder
 */
public void checkout(File repositoryFolder) {
	try {
		Git git = Git.open(repositoryFolder);
		Repository repo = git.getRepository();

		CommitFinder finder = new CommitFinder(repo);
		CommitCountFilter count = new CommitCountFilter();
		finder.setFilter(new AndCommitFilter(new CommitFilter() {

			public boolean include(RevWalk walker, RevCommit cmit)
					throws IOException {
				throw StopWalkException.INSTANCE;
			}

			public RevFilter clone() {
				return this;
			}
		}, count));
		finder.find();

		System.out.println(count.getCount());

	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:spgroup,项目名称:groundhog,代码行数:32,代码来源:GitClient.java

示例6: next

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
RevCommit next() throws MissingObjectException,
		IncorrectObjectTypeException, IOException {
	try {
		for (;;) {
			final RevCommit c = pending.next();
			if (c == null) {
				return null;
			}

			final boolean produce;
			if ((c.flags & UNINTERESTING) != 0)
				produce = false;
			else {
				if (filter.requiresCommitBody())
					c.parseBody(walker);
				produce = filter.include(walker, c);
			}

			for (final RevCommit p : c.parents) {
				if ((p.flags & SEEN) != 0)
					continue;
				if ((p.flags & PARSED) == 0)
					p.parseHeaders(walker);
				p.flags |= SEEN;
				pending.add(p);
			}
			walker.carryFlagsImpl(c);

			if ((c.flags & UNINTERESTING) != 0) {
				if (pending.everbodyHasFlag(UNINTERESTING)) {
					final RevCommit n = pending.peek();
					if (n != null && n.commitTime >= last.commitTime) {
						// This is too close to call. The next commit we
						// would pop is dated after the last one produced.
						// We have to keep going to ensure that we carry
						// flags as much as necessary.
						//
						overScan = OVER_SCAN;
					} else if (--overScan == 0)
						throw StopWalkException.INSTANCE;
				} else {
					overScan = OVER_SCAN;
				}
				if (canDispose)
					c.disposeBody();
				continue;
			}

			if (produce)
				return last = c;
			else if (canDispose)
				c.disposeBody();
		}
	} catch (StopWalkException swe) {
		pending.clear();
		return null;
	}
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:60,代码来源:PendingGenerator.java

示例7: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
public boolean include(RevWalk walker, RevCommit cmit)
        throws StopWalkException, MissingObjectException, IncorrectObjectTypeException, IOException {
    return cmit.getName().equals(revisionCommitName);
}
 
开发者ID:iazarny,项目名称:gitember,代码行数:6,代码来源:SingleRevisionFilter.java

示例8: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
@Override
public boolean include(RevWalk walker, RevCommit cmit)
		throws StopWalkException, MissingObjectException,
		IncorrectObjectTypeException, IOException {
	return commitSelection.accept(cmit);
}
 
开发者ID:link-intersystems,项目名称:GitDirStat,代码行数:7,代码来源:CommitSelectionRevFilter.java

示例9: include

import org.eclipse.jgit.errors.StopWalkException; //导入依赖的package包/类
/**
 * Determine if the supplied commit should be included in results.
 *
 * @param walker
 *            the active walker this filter is being invoked from within.
 * @param cmit
 *            the commit currently being tested. The commit has been parsed
 *            and its body is available for inspection only if the filter
 *            returns true from {@link #requiresCommitBody()}.
 * @return true to include this commit in the results; false to have this
 *         commit be omitted entirely from the results.
 * @throws StopWalkException
 *             the filter knows for certain that no additional commits can
 *             ever match, and the current commit doesn't match either. The
 *             walk is halted and no more results are provided.
 * @throws MissingObjectException
 *             an object the filter needs to consult to determine its answer
 *             does not exist in the Git repository the walker is operating
 *             on. Filtering this commit is impossible without the object.
 * @throws IncorrectObjectTypeException
 *             an object the filter needed to consult was not of the
 *             expected object type. This usually indicates a corrupt
 *             repository, as an object link is referencing the wrong type.
 * @throws IOException
 *             a loose object or pack file could not be read to obtain data
 *             necessary for the filter to make its decision.
 */
public abstract boolean include(RevWalk walker, RevCommit cmit)
		throws StopWalkException, MissingObjectException,
		IncorrectObjectTypeException, IOException;
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:31,代码来源:RevFilter.java


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