public File getFile() { if (myFile != null) { return myFile; } if (isFile()) { return new File(myTarget).getAbsoluteFile(); } return null; }
public File getFile() { if (myFile != null) { return myFile; } if (isFile()) { return new File(myTarget).getAbsoluteFile(); } return null; }
public File getFile() { if (myFile != null) { return myFile; } if (isFile()) { return new File(myTarget).getAbsoluteFile(); } return null; }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.isEmpty()) { targets.add(""); } SVNPath target = new SVNPath((String) targets.get(0)); if (target.isURL()) { target = new SVNPath(""); targets.add(0, ""); } String trailURL = (String) (targets.size() > 1 ? targets.get(1) : null); if (target.isFile()) { String id = SVNClientManager.newInstance().getWCClient().doGetWorkingCopyID(target.getFile(), trailURL, getSVNVersionEnvironment().isCommitted()); if (id != null) { getEnvironment().getOut().print(id); if (!getSVNVersionEnvironment().isNoNewLine()) { getEnvironment().getOut().println(); } } } }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.isEmpty()) { targets.add(""); } SVNPath target = new SVNPath((String) targets.get(0)); if (target.isURL()) { target = new SVNPath(""); targets.add(0, ""); } String trailURL = (String) (targets.size() > 1 ? targets.get(1) : null); if (target.isFile()) { String id = SVNClientManager.newInstance().getWCClient().doGetWorkingCopyID(target.getFile(), trailURL, getSVNVersionEnvironment().isCommitted()); if (id != null) { getEnvironment().getOut().print(id); if (!getSVNVersionEnvironment().isNoNewLine()) { getEnvironment().getOut().println(); } } } }
public void run() throws SVNException { List targets = getSVNEnvironment().combineTargets(getSVNEnvironment().getTargets(), true); if (targets.isEmpty()) { targets.add(""); } SvnOperationFactory factory = new SvnOperationFactory(); if (!getSVNEnvironment().isQuiet()) { factory.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment())); } SvnUpgrade upgrade = factory.createUpgrade(); for (Iterator ts = targets.iterator(); ts.hasNext();) { String targetName = (String) ts.next(); SVNPath target = new SVNPath(targetName); if (target.isFile()) { getSVNEnvironment().checkCancelled(); upgrade.setSingleTarget(SvnTarget.fromFile(target.getFile())); try { upgrade.run(); } catch (SVNException e) { getSVNEnvironment().handleWarning(e.getErrorMessage(), new SVNErrorCode[] {SVNErrorCode.WC_NOT_DIRECTORY}, getSVNEnvironment().isQuiet()); } } } }
public void run() throws SVNException { List targets = getSVNEnvironment().combineTargets(getSVNEnvironment().getTargets(), true); if (targets.isEmpty()) { targets.add(""); } SvnOperationFactory factory = new SvnOperationFactory(); if (!getSVNEnvironment().isQuiet()) { factory.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment())); } SvnUpgrade upgrade = factory.createUpgrade(); for (Iterator ts = targets.iterator(); ts.hasNext();) { String targetName = (String) ts.next(); SVNPath target = new SVNPath(targetName); if (target.isFile()) { getSVNEnvironment().checkCancelled(); upgrade.setSingleTarget(SvnTarget.fromFile(target.getFile())); try { upgrade.run(); } catch (SVNException e) { getSVNEnvironment().handleWarning(e.getErrorMessage(), new SVNErrorCode[] {SVNErrorCode.WC_NOT_DIRECTORY}, getSVNEnvironment().isQuiet()); } } } }
for(int i = 0; i < targets.size(); i++) { SVNPath target = new SVNPath((String) targets.get(i)); if (target.isFile()) { if ("".equals(target.getTarget())) { if (isScheduledForAddition(target.getFile())) {
for(int i = 0; i < targets.size(); i++) { SVNPath target = new SVNPath((String) targets.get(i)); if (target.isFile()) { if ("".equals(target.getTarget())) { if (isScheduledForAddition(target.getFile())) {
public void run() throws SVNException { List targets = getSVNEnvironment().combineTargets(getSVNEnvironment().getTargets(), true); if (targets.isEmpty()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS), SVNLogType.CLIENT); } SVNWCClient client = getSVNEnvironment().getClientManager().getWCClient(); if (!getSVNEnvironment().isQuiet()) { client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment())); } SVNDepth depth = getSVNEnvironment().getDepth(); if (depth == SVNDepth.UNKNOWN) { depth = SVNDepth.EMPTY; } for (Iterator ts = targets.iterator(); ts.hasNext();) { String targetName = (String) ts.next(); SVNPath target = new SVNPath(targetName); if (target.isFile()) { try { client.doResolve(target.getFile(), depth, SVNConflictChoice.MERGED); } catch (SVNException e) { SVNErrorMessage err = e.getErrorMessage(); getSVNEnvironment().handleWarning(err, new SVNErrorCode[] {err.getErrorCode()}, getSVNEnvironment().isQuiet()); } } } }
public void run() throws SVNException { List targets = getSVNEnvironment().combineTargets(getSVNEnvironment().getTargets(), true); if (targets.isEmpty()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS), SVNLogType.CLIENT); } SVNWCClient client = getSVNEnvironment().getClientManager().getWCClient(); if (!getSVNEnvironment().isQuiet()) { client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment())); } SVNDepth depth = getSVNEnvironment().getDepth(); if (depth == SVNDepth.UNKNOWN) { depth = SVNDepth.EMPTY; } for (Iterator ts = targets.iterator(); ts.hasNext();) { String targetName = (String) ts.next(); SVNPath target = new SVNPath(targetName); if (target.isFile()) { try { client.doResolve(target.getFile(), depth, SVNConflictChoice.MERGED); } catch (SVNException e) { SVNErrorMessage err = e.getErrorMessage(); getSVNEnvironment().handleWarning(err, new SVNErrorCode[] {err.getErrorCode()}, getSVNEnvironment().isQuiet()); } } } }
if (!target.isFile()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Exactly one property name and one file argument required"), SVNLogType.CLIENT);
if (!target.isFile()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Exactly one property name and one file argument required"), SVNLogType.CLIENT);
if (!target.isFile()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Exactly one file argument required"), SVNLogType.CLIENT);
if (!target.isFile()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Exactly one file argument required"), SVNLogType.CLIENT);
private SVNURL checkRootURLOfTarget(SVNURL rootURL, String target) throws SVNException { SVNPath svnPath = new SVNPath(target, true); SVNWCClient client = getClientManager().getWCClient(); File path = svnPath.isFile() ? svnPath.getFile() : null; SVNURL url = svnPath.isURL() ? svnPath.getURL() : null; SVNURL tmpRootURL = null; try { tmpRootURL = client.getReposRoot(path, url, svnPath.getPegRevision()); } catch (SVNException svne) { SVNErrorMessage err = svne.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.ENTRY_NOT_FOUND || err.getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { return rootURL; } throw svne; } if (rootURL != null) { if (!rootURL.equals(tmpRootURL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET, "All non-relative targets must have the same root URL"); SVNErrorManager.error(err, SVNLogType.CLIENT); } return rootURL; } return tmpRootURL; }
private SVNURL checkRootURLOfTarget(SVNURL rootURL, String target) throws SVNException { SVNPath svnPath = new SVNPath(target, true); SVNWCClient client = getClientManager().getWCClient(); File path = svnPath.isFile() ? svnPath.getFile() : null; SVNURL url = svnPath.isURL() ? svnPath.getURL() : null; SVNURL tmpRootURL = null; try { tmpRootURL = client.getReposRoot(path, url, svnPath.getPegRevision()); } catch (SVNException svne) { SVNErrorMessage err = svne.getErrorMessage(); if (err.getErrorCode() == SVNErrorCode.ENTRY_NOT_FOUND || err.getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { return rootURL; } throw svne; } if (rootURL != null) { if (!rootURL.equals(tmpRootURL)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET, "All non-relative targets must have the same root URL"); SVNErrorManager.error(err, SVNLogType.CLIENT); } return rootURL; } return tmpRootURL; }
client.setExportExpandsKeywords(!getSVNEnvironment().isIgnoreKeywords()); if (from.isFile()) { client.doExport(from.getFile(), dst.getFile(), pegRevision, revision, eol, getSVNEnvironment().isForce(), depth); } else {
private void doDiff(SVNDiffClient client, SVNLogEntry logEntry, SVNPath target, SVNDepth depth) throws SVNException { if (target.isFile()) { client.doDiff(target.getFile(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut(), getSVNEnvironment().getChangelistsCollection()); } else { client.doDiff(target.getURL(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut()); } }
private void doDiff(SVNDiffClient client, SVNLogEntry logEntry, SVNPath target, SVNDepth depth) throws SVNException { if (target.isFile()) { client.doDiff(target.getFile(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut(), getSVNEnvironment().getChangelistsCollection()); } else { client.doDiff(target.getURL(), target.getPegRevision(), SVNRevision.create(logEntry.getRevision() - 1), SVNRevision.create(logEntry.getRevision()), depth, true, getSVNEnvironment().getOut()); } }