Skip to content
Permalink
Browse files
Noting JENKINS-31838.
Originally-Committed-As: 0b1b639e1b14feb1d488e18814487af33be2aec0
  • Loading branch information
jglick committed Feb 7, 2016
1 parent feafd41 commit 5cb03cabae608e761c6dd9f97cea29ae69b51427
Showing with 2 additions and 1 deletion.
  1. +2 −1 cps/src/main/java/org/jenkinsci/plugins/workflow/cps/rerun/RerunAction.java
@@ -183,7 +183,7 @@ public String getDiff() {
return "???";
}
try {
StringBuilder diff = new StringBuilder(diff("Jenkinsfile", originalAction.getOriginalScript(), getOriginalScript()));
StringBuilder diff = new StringBuilder(diff(/* TODO JENKINS-31838 */"Jenkinsfile", originalAction.getOriginalScript(), getOriginalScript()));
Map<String,String> originalLoadedScripts = originalAction.getOriginalLoadedScripts();
for (Map.Entry<String,String> entry : getOriginalLoadedScripts().entrySet()) {
String script = entry.getKey();
@@ -199,6 +199,7 @@ public String getDiff() {
}
private static String diff(String script, String oldText, String nueText) throws IOException {
Diff hunks = Diff.diff(new StringReader(oldText), new StringReader(nueText), false);
// TODO rather than old vs. new could use (e.g.) build-10 vs. build-13
return hunks.isEmpty() ? "" : hunks.toUnifiedDiff("old/" + script, "new/" + script, new StringReader(oldText), new StringReader(nueText), 3);
}

0 comments on commit 5cb03ca

Please sign in to comment.