SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminArea adminArea = wcAccess.probeOpen(dst, true, recursive ? SVNWCAccess.INFINITE_DEPTH : 0);
SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminArea adminArea = wcAccess.probeOpen(dst, true, recursive ? SVNWCAccess.INFINITE_DEPTH : 0);
/** * Substitutes the beginning part of a Working Copy's URL with a new one. * * <p> * When a repository root location or a URL schema is changed the old URL of the * Working Copy which starts with <code>oldURL</code> should be substituted for a * new URL beginning - <code>newURL</code>. * * @param dst a Working Copy item's path * @param oldURL the old beginning part of the repository's URL that should * be overwritten * @param newURL a new beginning part for the repository location that * will overwrite <code>oldURL</code> * @param recursive if <span class="javakeyword">true</span> and <code>dst</code> is * a directory then the entire tree will be relocated, otherwise if * <span class="javakeyword">false</span> - only <code>dst</code> itself * @throws SVNException */ public void doRelocate(File dst, SVNURL oldURL, SVNURL newURL, boolean recursive) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminArea adminArea = wcAccess.probeOpen(dst, true, recursive ? SVNWCAccess.INFINITE_DEPTH : 0); String name = dst.equals(adminArea.getRoot()) ? adminArea.getThisDirName() : dst.getName(); doRelocate(adminArea, name, oldURL.toString(), newURL.toString(), recursive, new HashMap()); } finally { wcAccess.close(); } }
private void deleteExternal(File external) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); SVNAdminArea adminArea = wcAccess.open(external, true, SVNWCAccess.INFINITE_DEPTH); SVNException error = null; try { adminArea.removeFromRevisionControl(adminArea.getThisDirName(), true, false); } catch (SVNException svne) { getDebugLog().logFine(SVNLogType.WC, svne); error = svne; } if (error == null || error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { wcAccess.close(); } if (error != null && error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { external.getParentFile().mkdirs(); File newLocation = SVNFileUtil.createUniqueFile(external.getParentFile(), external.getName(), ".OLD", false); SVNFileUtil.rename(external, newLocation); } else if (error != null) { throw error; } }
private void deleteExternal(File external) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); SVNAdminArea adminArea = wcAccess.open(external, true, SVNWCAccess.INFINITE_DEPTH); SVNException error = null; try { adminArea.removeFromRevisionControl(adminArea.getThisDirName(), true, false); } catch (SVNException svne) { getDebugLog().logFine(SVNLogType.WC, svne); error = svne; } if (error == null || error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { wcAccess.close(); } if (error != null && error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { external.getParentFile().mkdirs(); File newLocation = SVNFileUtil.createUniqueFile(external.getParentFile(), external.getName(), ".OLD", false); SVNFileUtil.rename(external, newLocation); } else if (error != null) { throw error; } }
private SVNURL getOwnerURL(File root) { if (root != null && SVNFileType.getType(root) == SVNFileType.DIRECTORY) { SVNWCAccess access = createWCAccess(); try { access.open(root, false, 0); SVNEntry entry = access.getVersionedEntry(root, false); if (entry != null) { return entry.getSVNURL(); } } catch (SVNException e) { e.printStackTrace(); } finally { if (access != null) { try { access.close(); } catch (SVNException e) { } } } } return null; }
private SVNURL getOwnerURL(File root) { if (root != null && SVNFileType.getType(root) == SVNFileType.DIRECTORY) { SVNWCAccess access = createWCAccess(); try { access.open(root, false, 0); SVNEntry entry = access.getVersionedEntry(root, false); if (entry != null) { return entry.getSVNURL(); } } catch (SVNException e) { e.printStackTrace(); } finally { if (access != null) { try { access.close(); } catch (SVNException e) { } } } } return null; }
SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminAreaInfo adminAreaInfo = wcAccess.openAnchor(dst, true, recursive ? SVNWCAccess.INFINITE_DEPTH : 0);
SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminAreaInfo adminAreaInfo = wcAccess.openAnchor(dst, true, recursive ? SVNWCAccess.INFINITE_DEPTH : 0);
private void deleteExternal(SVNExternalInfo external) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); SVNAdminArea adminArea = wcAccess.open(external.getFile(), true, SVNWCAccess.INFINITE_DEPTH); SVNException error = null; try { adminArea.removeFromRevisionControl(adminArea.getThisDirName(), true, false); } catch (SVNException svne) { getDebugLog().info(svne); error = svne; } if (error == null || error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { wcAccess.close(); } if (error != null && error.getErrorMessage().getErrorCode() == SVNErrorCode.WC_LEFT_LOCAL_MOD) { external.getFile().getParentFile().mkdirs(); File newLocation = SVNFileUtil.createUniqueFile(external.getFile().getParentFile(), external.getFile().getName(), ".OLD"); SVNFileUtil.rename(external.getFile(), newLocation); } else if (error != null) { throw error; } }
private void copyVersionedDir(File from, File to, SVNRevision revision, String eolStyle, boolean force, boolean recursive) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); SVNAdminArea adminArea = wcAccess.probeOpen(from, false, 0); SVNEntry entry = wcAccess.getEntry(from, false);
private void copyVersionedDir(File from, File to, SVNRevision revision, String eolStyle, boolean force, SVNDepth depth) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); SVNAdminArea adminArea = wcAccess.probeOpen(from, false, 0);
private void copyVersionedDir(File from, File to, SVNRevision revision, String eolStyle, boolean force, SVNDepth depth) throws SVNException { SVNWCAccess wcAccess = createWCAccess(); SVNAdminArea adminArea = wcAccess.probeOpen(from, false, 0);
SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminAreaInfo adminAreaInfo = wcAccess.openAnchor(dst, true, recursive ? SVNWCAccess.INFINITE_DEPTH : 0);
SVNWCAccess wcAccess = createWCAccess(); SVNAdminAreaInfo adminInfo = null; try {
SVNWCAccess wcAccess = createWCAccess(); try { SVNAdminAreaInfo info = wcAccess.openAnchor(file, true, SVNWCAccess.INFINITE_DEPTH);
SVNWCAccess wcAccess = createWCAccess(); SVNAdminAreaInfo adminInfo = null; int admOpenDepth = depthIsSticky ? -1 : getLevelsToLockFromDepth(depth);
SVNWCAccess tmpAccess = null; try { tmpAccess = createWCAccess(); info = tmpAccess.openAnchor(path, false, SVNWCAccess.INFINITE_DEPTH); } finally { info.setWCAccess(wcAccess); } else { wcAccess = createWCAccess(); info = wcAccess.openAnchor(path, true, SVNWCAccess.INFINITE_DEPTH);
SVNWCAccess tmpAccess = null; try { tmpAccess = createWCAccess(); info = tmpAccess.openAnchor(path, false, SVNWCAccess.INFINITE_DEPTH); } finally { info.setWCAccess(wcAccess); } else { wcAccess = createWCAccess(); info = wcAccess.openAnchor(path, true, SVNWCAccess.INFINITE_DEPTH);
SVNWCAccess wcAccess = createWCAccess(); SVNAdminAreaInfo adminInfo = null; int admOpenDepth = depthIsSticky ? -1 : getLevelsToLockFromDepth(depth);