@Override public URL getFileLink(Path path) throws IOException { // https://demo-server.visualsvn.com/!/#tortoisesvn/view/head/svnrobots.txt String value = String.format("%s/view/head%s", url, path.getValue()); if (LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("FileLink URL: " + value); } return new URL(value); }
private StringBuffer getViewerUrlWithPath(SubversionChangeLogSet.Path path) throws RemoteException { String[] urlParts = this.getViewerUrl().split("\\?"); StringBuffer viewWithPath = new StringBuffer(urlParts[0]).append(path.getValue()).append("?"); if (urlParts.length > 1) { viewWithPath.append(urlParts[1]); } return viewWithPath; }
@Override public URL getDiffLink(SubversionChangeLogSet.Path path) throws IOException { return new URL(this.baseUrl, String.format(DIFF_FORMAT, this.repname, URLEncoder.encode(path.getValue(), "UTF-8"), Integer.valueOf(path.getLogEntry().getRevision()))); }
/** * {@inheritDoc} */ public URL getFileLink(SubversionChangeLogSet.Path path) throws IOException { int revision = path.getLogEntry().getRevision(); QueryBuilder query = new QueryBuilder(null); query.add("rev=" + revision); query.add("view=log"); return new URL(url, trimHeadSlash(path.getValue()) + query); }
/** * Inherited from AffectedFile */ public String getPath() { return getValue(); }
/** * Returns the file link value. * * @param path the given path value. * * @return the file link value. * * @throws IOException DOCUMENT ME! */ @Override public URL getFileLink(Path path) throws IOException { return new URL(url, trimHeadSlash(path.getValue()) + param()); }
private void thenValuesMustStartWithSlash() { for(LogEntry entry : changeLogSet.getLogs()) { for(Path path : entry.getPaths()) { Assert.assertTrue(path.getValue().startsWith("/")); } } }
private void thenPathsMustBeEqualToValues() { for(LogEntry entry : changeLogSet.getLogs()) { for(Path path : entry.getPaths()) { Assert.assertEquals(path.getPath(), path.getValue()); } } }
@Override public URL getFileLink(Path path) throws IOException { int revision = path.getLogEntry().getRevision(); String pathWithoutSlash = trimHeadSlash(path.getValue()); String command = pathWithoutSlash + params().add("rev=" + revision); return new URL(getAssemblaBasePath("nodes"), command); }
@Override public URL getDiffLink(Path path) throws IOException { if (path.getEditType() != EditType.EDIT) { return null; // no diff if this is not an edit change } int r = path.getLogEntry().getRevision(); return new URL(url, trimHeadSlash(path.getValue()) + param().add("r1=" + (r - 1)).add("r2=" + r)); }
/** * Trims off the root module portion to compute the path within FishEye. */ private String getPath(Path path) { String s = trimHeadSlash(path.getValue()); if (s.startsWith(repositoryInstance)) // this should be always true, but be defensive { s = trimHeadSlash(s.substring(repositoryInstance.length())); } return s; }
/** * Trims off the root module portion to compute the path within FishEye. */ private String getPath(Path path) { String s = trimHeadSlash(path.getValue()); if(s.startsWith(rootModule)) // this should be always true, but be defensive s = trimHeadSlash(s.substring(rootModule.length())); return s; }
/** * Returns the file link value. * * @param path the given path value. * @return the file link value. * @throws IOException DOCUMENT ME! */ @Override public URL getFileLink(Path path) throws IOException { return new URL(url, trimHeadSlash(path.getValue()) + param()); }
/** * Trims off the root module portion to compute the path within FishEye. */ private String getPath(Path path) { String s = trimHeadSlash(path.getValue()); if(s.startsWith(repositoryInstance)) // this should be always true, but be defensive s = trimHeadSlash(s.substring(repositoryInstance.length())); return s; }
/** * Inherited from AffectedFile */ public String getPath() { return getValue(); }
/** * Trims off the root module portion to compute the path within FishEye. */ private String getPath(Path path) { String s = trimHeadSlash(path.getValue()); if (s.startsWith(repositoryInstance)) // this should be always true, but be defensive { s = trimHeadSlash(s.substring(repositoryInstance.length())); } return s; }
/** * Trims off the root module portion to compute the path within FishEye. */ private String getPath(Path path) { String s = trimHeadSlash(path.getValue()); return s; }
@Override public URL getDiffLink(Path path) throws IOException { if (path.getEditType() != EditType.EDIT) { return null; // no diff if this is not an edit change } int r = path.getLogEntry().getRevision(); return new URL(url, trimHeadSlash(path.getValue()) + param().add("r1=" + (r - 1)).add("r2=" + r)); }
/** * Returns the file link value. * * @param path the given path value. * @return the file link value. * @throws IOException DOCUMENT ME! */ @Override public URL getFileLink(Path path) throws IOException { return new URL(url, trimHeadSlash(path.getValue()) + param()); }