Skip to content

Commit

Permalink
[JENKINS-37274] Misleading to print output about the prevTag—could be…
Browse files Browse the repository at this point in the history
… mistaken for the changelog of the build.
  • Loading branch information
jglick committed Oct 11, 2016
1 parent fc2a67d commit 92bbec6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/mercurial/MercurialSCM.java
Expand Up @@ -654,7 +654,7 @@ private void determineChanges(Run<?, ?> build, Launcher launcher, TaskListener l
HgExe hg = new HgExe(inst, credentials, launcher, node, listener, env);
try {

ArgumentListBuilder logCommand = hg.seed(true).add("log", "--rev", prevTag.getId());
ArgumentListBuilder logCommand = hg.seed(true).add("log", "--rev", prevTag.getId(), "--template", "exists\\n");
int exitCode = hg.launch(logCommand).pwd(repository).join();
if(exitCode != 0) {
listener.error("Previously built revision " + prevTag.getId() + " is not known in this clone; unable to determine change log");
Expand Down
3 changes: 3 additions & 0 deletions src/test/java/hudson/plugins/mercurial/SCMTestBase.java
Expand Up @@ -42,12 +42,15 @@
import org.jvnet.hudson.test.JenkinsRule;

import static org.junit.Assert.*;
import org.junit.ClassRule;
import org.jvnet.hudson.test.BuildWatcher;

public abstract class SCMTestBase {

@Rule public JenkinsRule j = new JenkinsRule();
@Rule public MercurialRule m = new MercurialRule(j);
@Rule public TemporaryFolder tmp = new TemporaryFolder();
@ClassRule public static BuildWatcher buildWatcher = new BuildWatcher();
private File repo;

@Before public void setUp() throws Exception {
Expand Down

0 comments on commit 92bbec6

Please sign in to comment.