public SvnInfo(SVNInfo info) { this(info.getURL().toDecodedString(), info.getCommittedRevision().getNumber()); }
public SvnInfo(SVNInfo info) { this( info.getURL().toDecodedString(), info.getCommittedRevision().getNumber() ); }
public SvnInfo(SVNInfo info) { this(info.getURL().toDecodedString(), info.getCommittedRevision().getNumber()); }
@Override public String getTag() throws VCSException { try { File localRoot = getLocalRepository(); SVNInfo info = getSVNManager().getWCClient().doInfo(localRoot, SVNRevision.WORKING); String url = info.getURL().toDecodedString(); String result = "/trunk"; if (!url.endsWith("/trunk")) { // on est pas sur le trunk, on est soit sur un tag ou une // branche, dans les deux cas, il faut descendre de 2 / int i = url.lastIndexOf("/"); i = url.lastIndexOf("/", i - 1); result = url.substring(i); } return result; } catch (SVNException eee) { throw new VCSException(t("isisfish.vcs.vcssvn.gettag.error"), eee); } }
private String relativeUrl(SVNInfo info) { final String relativePath = SVNPathUtil.getRelativePath(info.getRepositoryRootURL().toString(), info.getURL().toString()); return "^/" + relativePath; }
String wcUrl = svnInfo.getURL().toString();
private String relativeUrl(SVNInfo info) { final String relativePath = SVNPathUtil.getRelativePath(info.getRepositoryRootURL().toString(), info.getURL().toString()); return "^/" + relativePath; }
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(); } }
public PathContext invoke(File p, VirtualChannel channel) throws IOException { final SvnClientManager manager = SubversionSCM.createClientManager(authProvider); try { final SVNWCClient svnwc = manager.getWCClient(); SVNInfo info; try { info = svnwc.doInfo(p, SVNRevision.WORKING); String url = info.getURL().toDecodedString(); String repoRoot = info.getRepositoryRootURL().toDecodedString(); return new PathContext(url, repoRoot, null); } catch (SVNException e) { e.printStackTrace(); return null; } } finally { manager.dispose(); } }