mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-17 05:52:26 +00:00
fixed #404.
git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@2813 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
b86b9938de
commit
92d08fccff
3 files changed
+9
-2
No files matched your search
@@ -6,6 +6,7 @@ import hudson.scm.RepositoryBrowser;
|
||||
import hudson.scm.SubversionChangeLogSet.LogEntry;
|
||||
import hudson.scm.SubversionChangeLogSet.Path;
|
||||
import hudson.scm.SubversionRepositoryBrowser;
|
||||
import hudson.scm.EditType;
|
||||
import hudson.util.FormFieldValidator;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
import org.kohsuke.stapler.StaplerResponse;
|
||||
@@ -60,6 +61,8 @@ public class FishEyeSVN extends SubversionRepositoryBrowser {
|
||||
|
||||
@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, getPath(path)+String.format("?r1=%d&r2=%d",r-1,r));
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import hudson.scm.RepositoryBrowser;
|
||||
import hudson.scm.SubversionChangeLogSet;
|
||||
import hudson.scm.SubversionChangeLogSet.Path;
|
||||
import hudson.scm.SubversionRepositoryBrowser;
|
||||
import hudson.scm.EditType;
|
||||
import org.kohsuke.stapler.StaplerRequest;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -37,6 +38,8 @@ public class ViewSVN extends SubversionRepositoryBrowser {
|
||||
|
||||
@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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user