public class SVNUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addEntry(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath)
Puts directories and files under version control
|
org.tmatesoft.svn.core.wc.SVNClientManager |
authSvn(String svnRoot,
String username,
String password)
验证登录svn
|
long |
checkout(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
String svnPath,
org.tmatesoft.svn.core.wc.SVNRevision revision,
File destPath,
org.tmatesoft.svn.core.SVNDepth depth)
recursively checks out a working copy from url into wcDir
|
void |
checkVersiondDirectory(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wc) |
Result |
commit(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath,
boolean keepLocks,
String commitMessage)
Commit work copy's change to svn
|
long |
doSwitch(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File destPath,
String svnUrlStr) |
static SVNUtil |
getInstance() |
org.tmatesoft.svn.core.SVNCommitInfo |
importDirectory(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File localPath,
org.tmatesoft.svn.core.SVNURL dstURL,
String commitMessage,
boolean isRecursive)
Imports an unversioned directory into a repository location denoted by a
destination URL
|
boolean |
isIgnorefiles(File file)
判断文件是否该忽略
|
boolean |
isURLExist(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
String svnPath)
确定一个URL在SVN上是否存在
|
boolean |
isWorkingCopy(File path)
确定path是否是一个工作空间
|
org.tmatesoft.svn.core.SVNCommitInfo |
makeDirectory(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
org.tmatesoft.svn.core.SVNURL url,
String commitMessage)
Make directory in svn repository
|
Result |
merge(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File workDir,
String svnUrl,
boolean commit)
合并分支
|
Result |
overWrite(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File workDir,
String svnUrl)
把当前目录的文件强制更新到其它分支
|
org.tmatesoft.svn.core.wc.SVNStatus |
showStatus(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath,
boolean remote)
Collects status information on a single Working Copy item
|
long |
update(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath,
org.tmatesoft.svn.core.wc.SVNRevision updateToRevision,
org.tmatesoft.svn.core.SVNDepth depth)
Updates a working copy (brings changes from the repository into the
working copy).
|
public org.tmatesoft.svn.core.wc.SVNClientManager authSvn(String svnRoot, String username, String password)
public static final SVNUtil getInstance()
public org.tmatesoft.svn.core.SVNCommitInfo makeDirectory(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
org.tmatesoft.svn.core.SVNURL url,
String commitMessage)
clientManager - url - eg: http://svn.ambow.com/wlpt/bsp/trunkcommitMessage - public org.tmatesoft.svn.core.SVNCommitInfo importDirectory(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File localPath,
org.tmatesoft.svn.core.SVNURL dstURL,
String commitMessage,
boolean isRecursive)
clientManager - localPath - a local unversioned directory or singal file that will be
imported into a repository;dstURL - a repository location where the local unversioned
directory/file will be imported intocommitMessage - isRecursive - 递归public void addEntry(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath)
clientManager - SVNClientManagerwcPath - work copy pathpublic org.tmatesoft.svn.core.wc.SVNStatus showStatus(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath,
boolean remote)
clientManager - wcPath - local item's pathremote - true to check up the status of the item in the repository,
that will tell if the local item is out-of-date (like '-u'
option in the SVN client's 'svn status' command), otherwise
falsepublic Result commit(org.tmatesoft.svn.core.wc.SVNClientManager clientManager, File wcPath, boolean keepLocks, String commitMessage)
clientManager - wcPath - keepLocks - commitMessage - public long update(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wcPath,
org.tmatesoft.svn.core.wc.SVNRevision updateToRevision,
org.tmatesoft.svn.core.SVNDepth depth)
clientManager - wcPath - working copy pathupdateToRevision - revision to update todepth - update的深度:目录、子目录、文件public long checkout(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
String svnPath,
org.tmatesoft.svn.core.wc.SVNRevision revision,
File destPath,
org.tmatesoft.svn.core.SVNDepth depth)
clientManager - svnPath - a repository location from where a Working Copy will be
checked outrevision - the desired revision of the Working Copy to be checked outdestPath - the local path where the Working Copy will be placeddepth - checkout的深度,目录、子目录、文件public Result overWrite(org.tmatesoft.svn.core.wc.SVNClientManager clientManager, File workDir, String svnUrl)
clientManager - workDir - svnUrl - public Result merge(org.tmatesoft.svn.core.wc.SVNClientManager clientManager, File workDir, String svnUrl, boolean commit)
clientManager - workDir - svnUrl - public boolean isWorkingCopy(File path)
path - public boolean isURLExist(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
String svnPath)
clientManager - svnPath - public long doSwitch(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File destPath,
String svnUrlStr)
public void checkVersiondDirectory(org.tmatesoft.svn.core.wc.SVNClientManager clientManager,
File wc)
public boolean isIgnorefiles(File file)
file - Copyright © 2017. All rights reserved.