/** * Gets the SVN metadata for the given local workspace. * * @param workspace * The target to run "svn info". */ private SVNInfo parseSvnInfo(File workspace) throws SVNException { final SVNWCClient svnWc = manager.getWCClient(); return svnWc.doInfo(workspace,SVNRevision.WORKING); }
@Override public void addForCommit(String path) throws Exception { File f = new File(baseDirectory, path); filesForCommit.add(f); ourClientManager.getWCClient().doAdd(f, true, false, true, SVNDepth.EMPTY, false, true); }
/** * Gets the SVN metadata for the given local workspace. * * @param workspace * The target to run "svn info". */ private SVNInfo parseSvnInfo(File workspace) throws SVNException { final SVNWCClient svnWc = manager.getWCClient(); return svnWc.doInfo(workspace,SVNRevision.WORKING); }
/** * Gets the SVN metadata for the given local workspace. * * @param workspace * The target to run "svn info". */ private SVNInfo parseSvnInfo(File workspace) throws SVNException { final SVNWCClient svnWc = manager.getWCClient(); return svnWc.doInfo(workspace,SVNRevision.WORKING); }
protected SVNWCClient getSVNWCClient() { return getClientManager().getWCClient(); }
protected SVNWCClient getSVNWCClient() { return getClientManager().getWCClient(); }
protected SVNWCClient getWCClient(SVNRepository repository) { return getClientManager(repository).getWCClient(); }
public SVNWCClient getWCClient() { return wrapUp(core.getWCClient()); }
protected SVNWCClient getSVNWCClient() { return getClientManager().getWCClient(); }
protected SVNWCClient getSVNWCClient(){ return getClientManager().getWCClient(); }
public boolean accept( File pathname ) { if ( pathname.getName().equals( ".svn" ) ) { return false; } try { SVNInfo info = manager.getWCClient().doInfo( pathname, SVNRevision.HEAD ); if ( info != null ) { return false; } return !ignored.contains( pathname.getName() ); } catch ( SVNException ignore ) { return true; } } } )
public SVNInfo getInfo(FileNode node) throws SVNException { return clientManager.getWCClient().doInfo(node.toPath().toFile(), SVNRevision.WORKING); }
public SVNInfo getInfo(FileNode node) throws SVNException { return clientManager.getWCClient().doInfo(node.getFile(), SVNRevision.WORKING); }
@Override protected void preUpdate(ModuleLocation module, File local) throws SVNException, IOException { listener.getLogger().println("Reverting " + local + " ignoreExternals: " + module.isIgnoreExternalsOption()); final SVNWCClient svnwc = manager.getWCClient(); svnwc.setIgnoreExternals(module.isIgnoreExternalsOption()); svnwc.doRevert(new File[]{local.getCanonicalFile()}, getSvnDepth(module.getDepthOption()), null); } }
@Override protected void preUpdate(ModuleLocation module, File local) throws SVNException, IOException { listener.getLogger().println("Reverting " + local + " ignoreExternals: " + module.isIgnoreExternalsOption()); final SVNWCClient svnwc = manager.getWCClient(); svnwc.setIgnoreExternals(module.isIgnoreExternalsOption()); svnwc.doRevert(new File[]{local.getCanonicalFile()}, getSvnDepth(module.getDepthOption()), null); } }
@Override public String getFileVersion(String file) throws Exception { File f = new File(baseDirectory, file); if (!f.exists()) { return null; } SVNInfo info = ourClientManager.getWCClient().doInfo(f, SVNRevision.BASE); Log.logDebug(LOGGER, "SVN committed revision for file {0} is {1}", file, info.getCommittedRevision() .getNumber()); return Long.toString(info.getCommittedRevision().getNumber()); }
@Override protected void preUpdate(ModuleLocation module, File local) throws SVNException, IOException { listener.getLogger().println("Reverting " + local + " to depth " + module.getDepthOption() + " with ignoreExternals: " + module.isIgnoreExternalsOption()); final SVNWCClient svnwc = manager.getWCClient(); svnwc.setIgnoreExternals(module.isIgnoreExternalsOption()); svnwc.doRevert(new File[]{local.getCanonicalFile()}, module.getSvnDepthForRevert(), null); } }
/** * Gets the SVN metadata for the remote repository. * * @param remoteUrl The target to run "svn info". */ private static SVNInfo parseSvnInfo(SVNURL remoteUrl, ISVNAuthenticationProvider authProvider) throws SVNException { final SVNClientManager manager = createSvnClientManager(authProvider); try { final SVNWCClient svnWc = manager.getWCClient(); return svnWc.doInfo(remoteUrl, SVNRevision.HEAD, SVNRevision.HEAD); } finally { manager.dispose(); } }
/** * Gets the SVN metadata for the remote repository. * * @param remoteUrl The target to run "svn info". */ private static SVNInfo parseSvnInfo(SVNURL remoteUrl, ISVNAuthenticationProvider authProvider) throws SVNException { final SVNClientManager manager = createSvnClientManager(authProvider); try { final SVNWCClient svnWc = manager.getWCClient(); return svnWc.doInfo(remoteUrl, SVNRevision.HEAD, SVNRevision.HEAD); } finally { manager.dispose(); } }
public static String urlFromWorkspace(FileNode workspace) throws IOException { SVNClientManager clientManager; clientManager = SVNClientManager.newInstance(SVNWCUtil.createDefaultOptions(true)); try { return clientManager.getWCClient().doInfo(workspace.toPath().toFile(), SVNRevision.UNDEFINED).getURL().toString(); } catch (SVNException e) { throw new IOException("cannot determine workspace url: " + e.getMessage(), e); } finally { clientManager.dispose(); } } }