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


Java SVNUpdateClient.doUpdate方法代码示例

本文整理汇总了Java中org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate方法的典型用法代码示例。如果您正苦于以下问题:Java SVNUpdateClient.doUpdate方法的具体用法?Java SVNUpdateClient.doUpdate怎么用?Java SVNUpdateClient.doUpdate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.tmatesoft.svn.core.wc.SVNUpdateClient的用法示例。


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

示例1: performSVNupdate

import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
 * @param svnPathString
 *            String which contains the local SVN folder path.
 * @return Error code. If true --> SVN Operation failed.
 */
public final boolean performSVNupdate(final String svnPathString) {
    SfdcCommander commander = SfdcCommander.getInstance();
    boolean error = false;
    File svnPath = new File(svnPathString);

    // checkout
    try {
        ISVNAuthenticationManager authManager = getAuthManager(config);
        SVNUpdateClient updateClient = new SVNUpdateClient(authManager,
                SVNWCUtil.createDefaultOptions(true));

        updateClient.doUpdate(svnPath, SVNRevision.HEAD, SVNDepth.INFINITY,
                true, true);
        commander.info("SVN Update successfully processed.");
    } catch (SVNException e) {
        commander.info(e.getMessage());
        error = true;
    }
    return error;
}
 
开发者ID:jwiesel,项目名称:sfdcCommander,代码行数:26,代码来源:SvnHandler.java

示例2: doUpdate

import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
 * 更新文件
 * 
 * @param path
 * @return
 */
public Long doUpdate(File... files) {

	SVNUpdateClient updateClient = clientManager.getUpdateClient();
	updateClient.setIgnoreExternals(false);

	long version = 0;
	long tempVersion = 0;

	for (File file : files) {
		try {
			tempVersion = updateClient.doUpdate(file, SVNRevision.HEAD,
					SVNDepth.INFINITY, false, false);
			logger.info("update succcess");
			version = (version > tempVersion) ? version : tempVersion;
		} catch (SVNException e) {
			logger.error("update error");
			return null;
		}
	}
	return version;
}
 
开发者ID:joaquinaimar,项目名称:wizard,代码行数:28,代码来源:AbstractSvnOperation.java

示例3: update

import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public static long update(SVNClientManager clientManager, File wcPath, SVNRevision updateToRevision, boolean isRecursive)
		throws SVNException {

	SVNUpdateClient updateClient = clientManager.getUpdateClient();
	/*
	 * sets externals not to be ignored during the update
	 */
	updateClient.setIgnoreExternals(false);
	/*
	 * returns the number of the revision wcPath was updated to
	 */
	return updateClient.doUpdate(wcPath, updateToRevision, SVNDepth.fromRecurse(isRecursive), false, false);
}
 
开发者ID:AgarwalNeha1,项目名称:gluu,代码行数:14,代码来源:SvnHelper.java

示例4: update

import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
public long update(final File file, SVNRevision revision, SVNDepth i) throws SVNException {
    if (i == null) {
        i = SVNDepth.INFINITY;
    }
    // JDIO.removeDirectoryOrFile(file);
    file.mkdirs();

    final SVNUpdateClient updateClient = getUpdateClient();

    updateClient.setIgnoreExternals(false);
    if (revision == null) {
        revision = SVNRevision.HEAD;
    }

    try {

        // getWCClient().doAdd(path, force, mkdir, climbUnversionedParents,
        // depth, includeIgnored, makeParents);
        // long ret = updateClient.doCheckout(svnurl, file, revision,
        // revision, i, true);
        Log.L.info("SVN Update at " + file + " to Revision " + revision + " depths:" + i + "  " + svnurl);
        long ret = updateClient.doUpdate(file, revision, i, false, true);
        if (ret < 0) {
            // no working copy?
            ret = updateClient.doCheckout(svnurl, file, revision, revision, i, true);

        }
        return ret;
    } catch (final Exception e) {
        Log.L.info(e.getMessage());
        Log.L.info("SVN Checkout at " + file + "  " + svnurl);
        return updateClient.doCheckout(svnurl, file, revision, revision, i, true);

    } finally {
        Log.L.info("SVN Update finished");
    }
}
 
开发者ID:friedlwo,项目名称:AppWoksUtils,代码行数:38,代码来源:Subversion.java

示例5: update

import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
private static long update(File wcPath, SVNRevision updateToRevision, boolean isRecursive) throws SVNException {

        SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
        /*
         * sets externals not to be ignored during the update
         */
        updateClient.setIgnoreExternals(false);
        /*
         * returns the number of the revision wcPath was updated to
         */
        return updateClient.doUpdate(wcPath, updateToRevision, SVNDepth.fromRecurse(isRecursive), false, false);
    }
 
开发者ID:wdicarlo,项目名称:gradle-svnkit,代码行数:13,代码来源:WorkingCopy.java

示例6: update

import org.tmatesoft.svn.core.wc.SVNUpdateClient; //导入方法依赖的package包/类
/**
 * Updates a working copy (brings changes from the repository into the working copy).
 * Like 'svn update PATH' command; It's done by invoking
 * <p/>
 * SVNUpdateClient.doUpdate(File file, SVNRevision revision, boolean recursive)
 * <p/>
 * which takes the following parameters:
 * <p/>
 * file - a working copy entry that is to be updated;
 * <p/>
 * revision - a revision to which a working copy is to be updated;
 * <p/>
 * recursive - if true and an entry is a directory then doUpdate(..) recursively
 * updates the entire directory, otherwise - only child entries of the directory;
 */
public static long update( SVNUpdateClient updateClient, File wcPath, SVNRevision updateToRevision,
                           boolean isRecursive )
    throws SVNException
{
    //SVNUpdateClient updateClient = clientManager.getUpdateClient();
    /*
     * sets externals not to be ignored during the update
     */
    updateClient.setIgnoreExternals( false );
    /*
     * returns the number of the revision wcPath was updated to
     */
    return updateClient.doUpdate( wcPath, updateToRevision, isRecursive );
}
 
开发者ID:olamy,项目名称:maven-scm-provider-svnjava,代码行数:30,代码来源:SvnJavaUtil.java


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