Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: jenkinsci/mercurial-plugin
head fork: jenkinsci/mercurial-plugin
  • 8 commits
  • 2 files changed
  • 0 commit comments
  • 2 contributors
Commits on Feb 19, 2012
David Santiago Turiño 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
David Santiago Turiño nimeacuerdo Changes from review c9d8fae
David Santiago Turiño nimeacuerdo Fixed formatting 5d96b7a
Commits on May 02, 2012
David Santiago Turiño nimeacuerdo New test moved from SharingSCMTest to MercurialSCMTest class 5306c1d
Commits on May 03, 2012
David Santiago Turiño nimeacuerdo Test still had to be removed from SharingSCMTest e9945f9
David Santiago Turiño nimeacuerdo Cleaning up to have the minimum diff e2dbefd
Commits on May 04, 2012
David Santiago Turiño 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.