@Override public boolean exists(SVNRepository repository, SVNURL url, SVNRevision revision) { // Tries to gets information try { SVNInfo info = getWCClient(repository).doInfo(url, revision, revision); return info != null; } catch (SVNException ex) { return false; } }
/** * 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); }
/** * 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 = clientManager.getWCClient(); return svnWc.doInfo(workspace,SVNRevision.WORKING); }
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); }
@Override public SVNInfo getInfo(SVNRepository repository, SVNURL url, SVNRevision revision) { try { return getWCClient(repository).doInfo(url, revision, revision); } catch (SVNException e) { throw translateSVNException(e); } }
public SVNInfo getInfo(FileNode node) throws SVNException { return clientManager.getWCClient().doInfo(node.getFile(), SVNRevision.WORKING); }
@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()); }
/** * 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 Info info(String path) throws ClientException { SVNWCClient client = getSVNWCClient(); try { if(isURL(path)){ return JavaHLObjectFactory.createInfo(client.doInfo(SVNURL.parseURIEncoded(path), SVNRevision.UNDEFINED, SVNRevision.UNDEFINED)); } return JavaHLObjectFactory.createInfo(client.doInfo(new File(path).getAbsoluteFile(), SVNRevision.UNDEFINED)); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.UNVERSIONED_RESOURCE) { return null; } throwException(e); } return null; }
/** * Gets the SVN metadata for the remote repository. * * @param remoteUrl * The target to run "svn info". */ static SVNInfo parseSvnInfo(SVNURL remoteUrl, ISVNAuthenticationProvider authProvider) throws SVNException { final SvnClientManager manager = createClientManager(authProvider); try { final SVNWCClient svnWc = manager.getWCClient(); return svnWc.doInfo(remoteUrl, SVNRevision.HEAD, SVNRevision.HEAD); } finally { manager.dispose(); } }
@Override public long getRepositoryRevision(SVNRepository repository, SVNURL url) { try { SVNInfo info = getWCClient(repository).doInfo(url, SVNRevision.HEAD, SVNRevision.HEAD); return info.getCommittedRevision().getNumber(); } catch (SVNException e) { throw translateSVNException(e); } }
public Info info(String path) throws ClientException { SVNWCClient client = getSVNWCClient(); try { if (isURL(path)) { return JavaHLObjectFactory.createInfo(client.doInfo(SVNURL.parseURIEncoded(path), SVNRevision.UNDEFINED, SVNRevision.UNDEFINED)); } return JavaHLObjectFactory.createInfo(client.doInfo(new File(path).getAbsoluteFile(), SVNRevision.UNDEFINED)); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.UNVERSIONED_RESOURCE) { return null; } throwException(e); } finally { resetLog(); } return null; }
public Info info(String path) throws ClientException { SVNWCClient client = getSVNWCClient(); try { if (isURL(path)) { return JavaHLObjectFactory.createInfo(client.doInfo(SVNURL.parseURIEncoded(path), SVNRevision.UNDEFINED, SVNRevision.UNDEFINED)); } return JavaHLObjectFactory.createInfo(client.doInfo(new File(path).getAbsoluteFile(), SVNRevision.UNDEFINED)); } catch (SVNException e) { if (e.getErrorMessage().getErrorCode() == SVNErrorCode.UNVERSIONED_RESOURCE) { return null; } throwException(e); } finally { resetLog(); } return null; }
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(); } } }
public String invoke(File p, VirtualChannel channel) throws IOException { final SVNClientManager manager = SubversionSCM.createSvnClientManager(authProvider); try { final SVNWCClient svnwc = manager.getWCClient(); SVNInfo info; try { info = svnwc.doInfo(p, SVNRevision.WORKING); return info.getURL().toDecodedString(); } catch (SVNException e) { e.printStackTrace(); return null; } } finally { manager.dispose(); } }
public String invoke(File p, VirtualChannel channel) throws IOException { final SVNClientManager manager = SubversionSCM.createSvnClientManager(authProvider); try { final SVNWCClient svnwc = manager.getWCClient(); SVNInfo info; try { info = svnwc.doInfo(p, SVNRevision.WORKING); return info.getURL().toDecodedString(); } catch (SVNException e) { e.printStackTrace(); return null; } } finally { manager.dispose(); } }