public void setEventHandler(ISVNEventHandler dispatcher) { super.setEventHandler(dispatcher); myWCClient.setEventHandler(dispatcher); myCopyClient.setEventHandler(dispatcher); }
public void setEventHandler(ISVNEventHandler dispatcher) { super.setEventHandler(dispatcher); myWCClient.setEventHandler(dispatcher); myCopyClient.setEventHandler(dispatcher); }
private void addLocalParents(File path, ISVNEventHandler handler) throws SVNException { boolean created = path.mkdirs(); SVNWCClient wcClient = new SVNWCClient((ISVNAuthenticationManager) null, null); try { wcClient.setEventHandler(handler); wcClient.doAdd(path, false, false, true, SVNDepth.EMPTY, true, true); } catch (SVNException e) { if (created) { SVNFileUtil.deleteAll(path, true); } throw e; } }
private void addLocalParents(File path, ISVNEventHandler handler) throws SVNException { boolean created = path.mkdirs(); SVNWCClient wcClient = new SVNWCClient((ISVNAuthenticationManager) null, null); try { wcClient.setEventHandler(handler); wcClient.doAdd(path, false, false, true, SVNDepth.EMPTY, true, true); } catch (SVNException e) { if (created) { SVNFileUtil.deleteAll(path, true); } throw e; } }
/** * Returns an instance of the {@link SVNWCClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNWCClient</b> instance */ public SVNWCClient getWCClient() { if (myWCClient == null) { myWCClient = new SVNWCClient(this, myOptions); myWCClient.setEventHandler(myEventHandler); myWCClient.setDebugLog(getDebugLog()); } return myWCClient; }
client.setEventHandler(printer); Collection paths = new ArrayList(); Collection urls = new ArrayList();
/** * Returns an instance of the {@link SVNWCClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNWCClient</b> instance */ public SVNWCClient getWCClient() { if (myWCClient == null) { myWCClient = new SVNWCClient(this, myOptions); myWCClient.setEventHandler(myEventHandler); myWCClient.setDebugLog(getDebugLog()); myWCClient.setIgnoreExternals(myIsIgnoreExternals); } return myWCClient; }
/** * Returns an instance of the {@link SVNWCClient} class. * * <p> * If it's the first time this method is being called the object is * created, initialized and then returned. Further calls to this * method will get the same object instantiated at that moment of * the first call. <b>SVNClientManager</b> does not reinstantiate * its <b>SVN</b>*<b>Client</b> objects. * * @return an <b>SVNWCClient</b> instance */ public SVNWCClient getWCClient() { if (myWCClient == null) { myWCClient = new SVNWCClient(this, myOptions); myWCClient.setEventHandler(myEventHandler); myWCClient.setDebugLog(getDebugLog()); myWCClient.setIgnoreExternals(myIsIgnoreExternals); } return myWCClient; }
client.setEventHandler(printer); Collection paths = new ArrayList(); Collection urls = new ArrayList();
javaRepo.getClientManager().getWCClient().setEventHandler( handler ); javaRepo.getClientManager().getWCClient().setEventHandler( null );
client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));
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()); } } } }
client.setEventHandler(printer);
client.setEventHandler(printer);
private void copyDisjointDir(File nestedWC, SVNWCAccess parentAccess, File nestedWCParent) throws SVNException { SVNWCClient wcClient = new SVNWCClient((ISVNAuthenticationManager) null, null); wcClient.setEventHandler(getEventDispatcher()); wcClient.doCleanup(nestedWC); SVNWCAccess nestedWCAccess = createWCAccess(); SVNAdminArea dir; String copyFromURL = null; long copyFromRevision = -1; try { dir = nestedWCAccess.open(nestedWC, true, SVNWCAccess.INFINITE_DEPTH); SVNEntry nestedWCThisEntry = nestedWCAccess.getVersionedEntry(nestedWC, false); postCopyCleanup(dir); if (nestedWCThisEntry.isCopied()) { if (nestedWCThisEntry.getCopyFromURL() != null) { copyFromURL = nestedWCThisEntry.getCopyFromURL(); copyFromRevision = nestedWCThisEntry.getCopyFromRevision(); } Map attributes = new SVNHashMap(); attributes.put(SVNProperty.URL, copyFromURL); dir.modifyEntry(dir.getThisDirName(), attributes, true, false); } else { copyFromURL = nestedWCThisEntry.getURL(); copyFromRevision = nestedWCThisEntry.getRevision(); } } finally { nestedWCAccess.close(); } SVNWCManager.add(nestedWC, parentAccess.getAdminArea(nestedWCParent), SVNURL.parseURIEncoded(copyFromURL), copyFromRevision, SVNDepth.INFINITY); }
private void copyDisjointDir(File nestedWC, SVNWCAccess parentAccess, File nestedWCParent) throws SVNException { SVNWCClient wcClient = new SVNWCClient((ISVNAuthenticationManager) null, null); wcClient.setEventHandler(getEventDispatcher()); wcClient.doCleanup(nestedWC); SVNWCAccess nestedWCAccess = createWCAccess(); SVNAdminArea dir; String copyFromURL = null; long copyFromRevision = -1; try { dir = nestedWCAccess.open(nestedWC, true, SVNWCAccess.INFINITE_DEPTH); SVNEntry nestedWCThisEntry = nestedWCAccess.getVersionedEntry(nestedWC, false); postCopyCleanup(dir); if (nestedWCThisEntry.isCopied()) { if (nestedWCThisEntry.getCopyFromURL() != null) { copyFromURL = nestedWCThisEntry.getCopyFromURL(); copyFromRevision = nestedWCThisEntry.getCopyFromRevision(); } Map attributes = new SVNHashMap(); attributes.put(SVNProperty.URL, copyFromURL); dir.modifyEntry(dir.getThisDirName(), attributes, true, false); } else { copyFromURL = nestedWCThisEntry.getURL(); copyFromRevision = nestedWCThisEntry.getRevision(); } } finally { nestedWCAccess.close(); } SVNWCManager.add(nestedWC, parentAccess.getAdminArea(nestedWCParent), SVNURL.parseURIEncoded(copyFromURL), copyFromRevision, SVNDepth.INFINITY); }
wcClient.setEventHandler(getEventDispatcher()); wcClient.doCleanup(dst);
wcClient.setEventHandler(getEventDispatcher()); wcClient.doCleanup(dst);
client.setEventHandler(new SVNNotifyPrinter(getSVNEnvironment()));