Skip to content

Commit

Permalink
Merge pull request #656 from ssogabe/JENKINS-16194
Browse files Browse the repository at this point in the history
[JENKINS-16194] Delete the oldest build but it still come up on HistoryWidget
  • Loading branch information
ssogabe committed Dec 28, 2012
2 parents 49d1392 + 2fd5fee commit ff6ae91
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion core/src/main/java/hudson/model/AbstractBuild.java
Expand Up @@ -189,7 +189,13 @@ void dropLinks() {

if(nextBuild!=null) {
AbstractBuild nb = nextBuild.get();
if (nb!=null) nb.previousBuild = previousBuild;
if (nb!=null) {
// remove the oldest build
if (previousBuild == selfReference)
nb.previousBuild = nextBuild;
else
nb.previousBuild = previousBuild;
}
}
if(previousBuild!=null) {
AbstractBuild pb = previousBuild.get();
Expand Down

0 comments on commit ff6ae91

Please sign in to comment.