Skip to content

Commit

Permalink
Support absolute path (URL) for diff base
Browse files Browse the repository at this point in the history
References #139

Signed-off-by: Robert Munteanu <[email protected]>
  • Loading branch information
selsemore authored and rombert committed Apr 9, 2015
1 parent a69261c commit 42d4f5f
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.ParseException;

import org.apache.commons.io.IOUtils;
Expand Down Expand Up @@ -63,7 +65,14 @@ public byte[] getContents(IProgressMonitor monitor) throws CoreException{

Activator.getDefault().trace(TraceLocation.MAIN, "Retrieving file " + _filePath + " @ " + _revision + " from repo " + repoLocation.getLabel() + " ( " + repoLocation.getLocation() + " )");

SVNUrl resourceUrl = repoLocation.getUrl().appendPath(_filePath);
SVNUrl resourceUrl;
try {
new URL(_filePath);
resourceUrl = new SVNUrl(_filePath);
}
catch (MalformedURLException ex) {
resourceUrl = repoLocation.getUrl().appendPath(_filePath);
}
SVNRevision revision = SVNRevision.getRevision(_revision);
InputStream content = repoLocation.getSVNClient().getContent(resourceUrl, revision);

Expand Down

0 comments on commit 42d4f5f

Please sign in to comment.