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


Java ISVNStatusHandler类代码示例

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


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

示例1: getStatus

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
public static void getStatus(SVNClientManager clientManager, File wcPath, boolean isRecursive, boolean isRemote, boolean isReportAll,
		boolean isIncludeIgnored, boolean isCollectParentExternals, ISVNStatusHandler statusHandler) throws SVNException {
	/*
	 * StatusHandler displays status information for each entry in the
	 * console (in the manner of the native Subversion command line client)
	 */
	clientManager.getStatusClient().doStatus(wcPath, SVNRevision.HEAD, SVNDepth.fromRecurse(isRecursive), isRemote, isReportAll,
			isIncludeIgnored, isCollectParentExternals, statusHandler, null);
}
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:10,代码来源:SvnHelper.java

示例2: statusToString

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
private String statusToString() throws IllegalArgumentException, SVNException, IOException
{
	StringBuilder sb = new StringBuilder();

	HashMap<SVNStatusType, ArrayList<String>> result = new HashMap<>();
	getSvn().getStatusClient().doStatus(localFolder_, SVNRevision.BASE, SVNDepth.INFINITY, false, true, true, false, new ISVNStatusHandler()
	{

		@Override
		public void handleStatus(SVNStatus status) throws SVNException
		{
			ArrayList<String> temp = result.get(status.getNodeStatus());
			if (temp == null)
			{
				temp = new ArrayList<>();
				result.put(status.getNodeStatus(), temp);
			}
			String path = status.getRepositoryRelativePath();
			if (path == null || path.isEmpty())
			{
				path = getPathRelativeToRoot(status.getFile());
				if (path.isEmpty())
				{
					path = "{repo root}";
				}
			}
			temp.add(path);
		}
	}, new ArrayList<String>());

	for (Entry<SVNStatusType, ArrayList<String>> x : result.entrySet())
	{
		sb.append(x.getKey().toString() + " - " + x.getValue() + eol);
	}
	return sb.toString();
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:37,代码来源:SyncServiceSVN.java

示例3: getLocallyModifiedFiles

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
private Set<String> getLocallyModifiedFiles() throws IOException
{
	try
	{
		HashSet<String> result = new HashSet<>();
		getSvn().getStatusClient().doStatus(localFolder_, SVNRevision.BASE, SVNDepth.INFINITY, false, false, false, false, new ISVNStatusHandler()
		{

			@Override
			public void handleStatus(SVNStatus status) throws SVNException
			{
				if (status.getNodeStatus() == SVNStatusType.STATUS_MODIFIED || status.getNodeStatus() == SVNStatusType.STATUS_ADDED
						|| status.getNodeStatus() == SVNStatusType.STATUS_UNVERSIONED || status.getNodeStatus() == SVNStatusType.MERGED
						|| status.getNodeStatus() == SVNStatusType.STATUS_DELETED || status.getNodeStatus() == SVNStatusType.STATUS_REPLACED
						|| status.getNodeStatus() == SVNStatusType.MERGED)
				{
					result.add(getPathRelativeToRoot(status.getFile()));
				}
			}
		}, new ArrayList<String>());

		return result;
	}
	catch (Exception e)
	{
		log.error("Unexpected", e);
		throw new IOException("Internal error", e);
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:30,代码来源:SyncServiceSVN.java

示例4: getFilesInMergeConflict

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
/**
 * @throws IOException
 * @see gov.va.isaac.interfaces.sync.ProfileSyncI#getFilesInMergeConflict()
 */
@Override
public Set<String> getFilesInMergeConflict() throws IOException
{
	try
	{
		HashSet<String> result = new HashSet<>();
		getSvn().getStatusClient().doStatus(localFolder_, SVNRevision.BASE, SVNDepth.INFINITY, false, false, false, false, new ISVNStatusHandler()
		{

			@Override
			public void handleStatus(SVNStatus status) throws SVNException
			{
				if (status.isConflicted())
				{
					result.add(status.getRepositoryRelativePath());
				}
			}
		}, new ArrayList<String>());

		return result;
	}
	catch (Exception e)
	{
		log.error("Unexpected", e);
		throw new IOException("Internal error", e);
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:32,代码来源:SyncServiceSVN.java

示例5: doStatus

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
@Override
public long doStatus(File path,
                     boolean recursive,
                     boolean remote,
                     boolean reportAll,
                     boolean includeIgnored,
                     boolean collectParentExternals,
                     ISVNStatusHandler handler) throws SVNException {
  return myStatusClient.doStatus(path, recursive, remote, reportAll, includeIgnored, collectParentExternals, handler);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:11,代码来源:SvnkitSvnStatusClient.java

示例6: create

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
public static StatusCallback create(final ISVNStatusHandler handler, final Convertor<String, SVNInfo> infoGetter,
                                    final Consumer<SVNException> exceptionConsumer) {
  return new StatusCallback() {
    @Override
    public void doStatus(String path, Status status) {
      if (handler == null) return;
      try {
        handler.handleStatus(convert(path, status, infoGetter));
      }
      catch (SVNException e) {
        exceptionConsumer.consume(e);
      }
    }
  };
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:16,代码来源:StatusCallbackConvertor.java

示例7: addUntrackedFiles

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
/**
 * @see gov.va.isaac.interfaces.sync.ProfileSyncI#addUntrackedFiles(java.io.File)
 */
@Override
public void addUntrackedFiles() throws IllegalArgumentException, IOException
{
	log.info("Add Untracked files called");
	try
	{
		HashSet<String> result = new HashSet<>();
		HashSet<String> conflicts = new HashSet<>();
		getSvn().getStatusClient().doStatus(localFolder_, SVNRevision.BASE, SVNDepth.INFINITY, false, false, false, false, new ISVNStatusHandler()
		{

			@Override
			public void handleStatus(SVNStatus status) throws SVNException
			{
				if (status.getNodeStatus() == SVNStatusType.STATUS_UNVERSIONED)
				{
					result.add(getPathRelativeToRoot(status.getFile()));
				}
				else if (status.getNodeStatus() == SVNStatusType.STATUS_CONFLICTED)
				{
					conflicts.add(getPathRelativeToRoot(status.getFile()));
				}
			}
		}, new ArrayList<String>());

		//don't try to add conflict marker files
		for (String s : conflicts)
		{
			Iterator<String> toAdd = result.iterator();
			while (toAdd.hasNext())
			{
				String item = toAdd.next();
				if (item.equals(s + ".mine") || item.startsWith(s + ".r"))
				{
					toAdd.remove();
				}
			}
		}

		addFiles(result.toArray(new String[result.size()]));
	}
	catch (SVNException e)
	{
		log.error("Unexpected", e);
		throw new IOException("Internal error", e);
	}
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:51,代码来源:SyncServiceSVN.java

示例8: doStatus

import org.tmatesoft.svn.core.wc.ISVNStatusHandler; //导入依赖的package包/类
long doStatus(File path, boolean recursive, boolean remote, boolean reportAll,
boolean includeIgnored, ISVNStatusHandler handler) throws SVNException;
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:3,代码来源:SvnStatusClientI.java


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