Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 8 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Feb 19, 2012
@nimeacuerdo nimeacuerdo JENKINS-12829: A failed update sets revision of build to 000000+
The mercurial plugin ensures that a failed clone operation throws the
corresponding exception, but that's not the case if the subsequent
update fails: no check is done of the return code of the hg update

The effect is that the revision of the build is set to 000000+, which
causes a huge change log calculation in the next build, as basically
the calculated log includes all thechange setss in the history of the
Commits on May 01, 2012
@nimeacuerdo nimeacuerdo Changes from review c9d8fae
@nimeacuerdo nimeacuerdo Fixed formatting 5d96b7a
Commits on May 02, 2012
@nimeacuerdo nimeacuerdo New test moved from SharingSCMTest to MercurialSCMTest class 5306c1d
Commits on May 03, 2012
@nimeacuerdo nimeacuerdo Test still had to be removed from SharingSCMTest e9945f9
@nimeacuerdo nimeacuerdo Cleaning up to have the minimum diff e2dbefd
Commits on May 04, 2012
@nimeacuerdo nimeacuerdo Merge with master as requested during review 84205ec
Commits on May 07, 2012
Jesse Glick Merge pull request #22 from nimeacuerdo/fix-multiple-revisions-per-bu…

[FIXED JENKINS-12829] A failed update sets revision of build to 000000+
4 src/main/java/hudson/plugins/mercurial/
@@ -610,7 +610,9 @@ private void clone(AbstractBuild<?,?> build, Launcher launcher, FilePath reposit
ArgumentListBuilder upArgs = new ArgumentListBuilder();
upArgs.add("--rev", getBranch(env));
+ if ( != 0) {
+ throw new AbortException("Failed to update " + source + " to rev " + getBranch(env));
+ }
String tip = hg.tip(repository, null);
String rev = hg.tipNumber(repository, null);
17 src/test/java/hudson/plugins/mercurial/
@@ -3,6 +3,7 @@
import hudson.Launcher;
import hudson.Proc;
import hudson.model.AbstractBuild;
+import hudson.model.Action;
import hudson.model.Cause.UserCause;
import hudson.model.FreeStyleBuild;
import hudson.model.FreeStyleProject;
@@ -581,6 +582,22 @@ public void testTrailingUrlWhitespace() throws Exception {
AbstractBuild<?, ?> b = p.scheduleBuild2(0).get();
assertEquals(Result.SUCCESS, b.getResult());
+ @Bug(12829)
+ public void testNonExistingBranchesDontGenerateMercurialTagActionsInTheBuild() throws Exception {
+ AbstractBuild<?, ?> b;
+ FreeStyleProject p = createFreeStyleProject();
+ p.setScm(new MercurialSCM(hgInstallation, repo.getPath(), "non-existing-branch", null,
+ null, null, false));
+ hg(repo, "init");
+ touchAndCommit(repo, "dir1/f1");
+ b = p.scheduleBuild2(0).get();
+ for (Action action : b.getActions()) {
+ if (action instanceof MercurialTagAction) {
+ fail("There should not be any MercurialTagAction");
+ }
+ }
+ }
private PretendSlave createNoopPretendSlave() throws Exception {
return createPretendSlave(new NoopFakeLauncher());

No commit comments for this range

Something went wrong with that request. Please try again.