Skip to content

Commit

Permalink
[FIXED JENKINS-23107] Check to ensure that there is a build with a wo…
Browse files Browse the repository at this point in the history
…rkspace available
  • Loading branch information
hugueschabot committed Jul 6, 2014
1 parent f184814 commit 08df4c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Expand Up @@ -156,7 +156,13 @@ public long rebase(final TaskListener listener, final long upstreamRev) throws I

final ModuleLocation upstreamLocation = getUpstreamSubversionLocation();

return owner.getModuleRoot().act(new FileCallable<Long>() {
AbstractBuild build = owner.getSomeBuildWithWorkspace();
if (build == null) {
final PrintStream logger = listener.getLogger();
logger.print("No workspace found for project! Please perform a build first.\n");
return -1L;
}
return build.getModuleRoot().act(new FileCallable<Long>() {
public Long invoke(File mr, VirtualChannel virtualChannel) throws IOException {
try {
final PrintStream logger = listener.getLogger();
Expand Down
Expand Up @@ -20,10 +20,9 @@ l.layout(norefresh:true, title:_("title",my.project.displayName)) {

if (ia==null) {
p {
raw("""
This project has not been integrated to
<a href="${Functions.getRelativeLinkTo(my.branchProperty.upstreamProject)}">the upstream</a> yet."
""")
text("This project has not been integrated to ")
a(href: Functions.getRelativeLinkTo(my.branchProperty.upstreamProject), "the upstream")
text(" yet.")
}
} else {
p {
Expand Down

0 comments on commit 08df4c8

Please sign in to comment.