public void linkPath(SVNURL url, String path, String lockToken, long revison, boolean startEmpty) throws SVNException { String rootURL = SVNPathUtil.getCommonURLAncestor(url.toString(), myRepositoryLocation); if (rootURL.length() < myRepositoryLocation.length()) { myRepositoryLocation = rootURL; } myReporter.linkPath(url, path, lockToken, revison, startEmpty); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { SVNURL rootURL = SVNURLUtil.getCommonURLAncestor(url, myRepositoryLocation); if (SVNPathUtil.getPathAsChild(rootURL.getPath(), myRepositoryLocation.getPath()) != null) { myRepositoryLocation = rootURL; } myReporter.linkPath(url, path, lockToken, revision, depth, startEmpty); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { SVNURL ancestor = SVNURLUtil.getCommonURLAncestor(url, repositoryLocation); /* If we got a shorter ancestor, truncate our current ancestor. Note that svn_dirent_get_longest_ancestor will allocate its return value even if it identical to one of its arguments. */ if (SVNPathUtil.getPathAsChild(ancestor.getPath(), repositoryLocation.getPath()) != null) { repositoryLocation = ancestor; // TODO set depth infinity to reportBaton: // This depth is only used to report locks in finishReport() method // Currently SVNRepository#getLocks doesn't support depth, so the assignment is useless // But when it will, the depth should be kept and passed to SVNRepository#getLocks // rb->depth = svn_depth_infinity; } reporter.linkPath(url, path, lockToken, revision, depth, startEmpty); }
public void applyTo(org.tmatesoft.svn.core.io.ISVNReporter reporter) throws SVNException { switch (kind) { case SET_PATH: reporter.setPath(path, lockToken, revision, SVNClientImpl.getDepth(depth), startEmpty); break; case LINK_PATH: reporter.linkPath(SVNURL.parseURIEncoded(url), path, lockToken, revision, SVNClientImpl.getDepth(depth), startEmpty); break; case DELETE_PATH: reporter.deletePath(path); break; default: throw new IllegalStateException("Uknown kind " + kind); } } }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { SVNURL rootURL = SVNURLUtil.getCommonURLAncestor(url, myCommonAncestorLocation); if (rootURL == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_URL, "Can not determine common ancestor of ''{0}'' and ''{1}'';\nprobably these entries belong to different repositories.", new Object[] {url, myCommonAncestorLocation}); SVNErrorManager.error(err, SVNLogType.WC); } if (SVNPathUtil.getPathAsChild(rootURL.getPath(), myCommonAncestorLocation.getPath()) != null) { myCommonAncestorLocation = rootURL; } myReporter.linkPath(url, path, lockToken, revision, depth, startEmpty); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { SVNURL rootURL = SVNURLUtil.getCommonURLAncestor(url, myRepositoryLocation); if (rootURL == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_URL, "Can not determine common ancestor of ''{0}'' and ''{1}'';\nprobably these entries belong to different repositories.", new Object[] {url, myRepositoryLocation}); SVNErrorManager.error(err, SVNLogType.WC); } if (SVNPathUtil.getPathAsChild(rootURL.getPath(), myRepositoryLocation.getPath()) != null) { myRepositoryLocation = rootURL; } myReporter.linkPath(url, path, lockToken, revision, depth, startEmpty); }
if (thisSwitched) { SVNURL url = SVNWCUtils.join(dirReposRoot, ths.reposRelPath); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, ths.depth, false); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, ths.depth, false); if (thisSwitched) { SVNURL url = SVNWCUtils.join(dirReposRoot, ths.reposRelPath); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, reportDepth, startEmpty); reporter.linkPath(url, thisReportRelpath, ths.lock != null ? ths.lock.token : null, ths.revision, reportDepth, startEmpty);
if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), false); } else { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), false); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), false); } else if (entry.getRevision() != dirRevision || entry.getLockToken() != null) { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), false); if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete()); } else { reporter.setPath(path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete()); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete()); } else if (childEntry.getLockToken() != null || childEntry.getRevision() != dirRevision || childEntry.isIncomplete()) { reporter.setPath(path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.isIncomplete());
public void report(ISVNReporter reporter) throws SVNException { WCDbBaseInfo baseInfo = null; try { baseInfo = context.getDb().getBaseInfo(localAbsPath, BaseInfoField.kind, BaseInfoField.revision, BaseInfoField.reposRelPath, BaseInfoField.reposRootUrl, BaseInfoField.updateRoot, BaseInfoField.lock); if (baseInfo.kind == SVNWCDbKind.Dir || !baseInfo.updateRoot) { reporter.setPath("", null, 0, SVNDepth.INFINITY, false); reporter.deletePath(""); } else { if (restoreFiles) { SVNFileType ft = SVNFileType.getType(localAbsPath); if (ft == SVNFileType.NONE) { SVNReporter17.restoreNode(context, localAbsPath, SVNWCDbKind.File, baseInfo.revision, useCommitTimes); } } reporter.setPath("", null, baseInfo.revision, SVNDepth.INFINITY, false); SVNURL url = baseInfo.reposRootUrl.appendPath(SVNFileUtil.getFilePath(baseInfo.reposRelPath), false); String lockToken = baseInfo.lock != null ? baseInfo.lock.token : null; reporter.linkPath(url, "", lockToken, baseInfo.revision, SVNDepth.INFINITY, false); } } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() != SVNErrorCode.WC_PATH_NOT_FOUND) { throw e; } reporter.setPath("", null, 0, SVNDepth.INFINITY, false); reporter.deletePath(""); } reporter.finishReport(); }
if (parentEntry != null && !expectedURL.equals(url)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, "", targetEntry.getLockToken(), targetEntry.getRevision(), false); } else if (targetEntry.getRevision() != revision || targetEntry.getLockToken() != null) { reporter.setPath("", targetEntry.getLockToken(), targetEntry.getRevision(), false);
if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); } else { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); } else if (entry.getRevision() != dirRevision || entry.getLockToken() != null || if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.getDepth(), startEmpty); } else { reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.getDepth(), startEmpty); } else if (childEntry.getLockToken() != null ||
if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); } else { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); } else if (entry.getRevision() != dirRevision || entry.getLockToken() != null || if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.getDepth(), startEmpty); } else { reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.getDepth(), startEmpty); } else if (childEntry.getLockToken() != null ||
if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); } else { reporter.setPath(path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); reporter.linkPath(svnURL, path, entry.getLockToken(), entry.getRevision(), entry.getDepth(), false); } else if (entry.getRevision() != dirRevision || entry.getLockToken() != null || if (!url.equals(expectedURL)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.getDepth(), startEmpty); } else { reporter.linkPath(svnURL, path, childEntry.getLockToken(), childEntry.getRevision(), childEntry.getDepth(), startEmpty); } else if (childEntry.getLockToken() != null ||
if (parentEntry != null && !expectedURL.equals(url)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, "", targetEntry.getLockToken(), targetEntry.getRevision(), targetEntry.getDepth(), false); } else if (targetEntry.getRevision() != revision || targetEntry.getLockToken() != null) { reporter.setPath("", targetEntry.getLockToken(), targetEntry.getRevision(), targetEntry.getDepth(), false);
if (parentEntry != null && !expectedURL.equals(url)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, "", targetEntry.getLockToken(), targetEntry.getRevision(), targetEntry.getDepth(), false); } else if (targetEntry.getRevision() != revision || targetEntry.getLockToken() != null) { reporter.setPath("", targetEntry.getLockToken(), targetEntry.getRevision(), targetEntry.getDepth(), false);
if (parentEntry != null && !expectedURL.equals(url)) { SVNURL svnURL = SVNURL.parseURIEncoded(url); reporter.linkPath(svnURL, "", targetEntry.getLockToken(), targetEntry.getRevision(), targetEntry.getDepth(), false); } else if (targetEntry.getRevision() != revision || targetEntry.getLockToken() != null) { reporter.setPath("", targetEntry.getLockToken(), targetEntry.getRevision(), targetEntry.getDepth(), false);
if (!repos_relpath.equals(SVNFileUtil.createFilePath(parentInfo.reposRelPath, base))) { SVNURL url = SVNWCUtils.join(repos_root, repos_relpath); reporter.linkPath(url, "", target_lock != null ? target_lock.token : null, target_rev, SVNDepth.INFINITY, false); } else if (target_lock != null) { reporter.setPath("", target_lock.token, target_rev, SVNDepth.INFINITY, false);