Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2057

Bugs with branches

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • mercurial-plugin
    • None
    • Platform: All, OS: Linux

      Two bugs when working with branches:

      1. Hudson thinks there are changes, even when there aren't any.

      2. Workspaces are not the proper checkout.

      Here are two patches for src/main/java/hudson/plugins/mercurial/MercurialSCM.java:

      For issue #1:

      // Get the list of changed files.
      + ArgumentListBuilder args = new ArgumentListBuilder();
      + args.add(getDescriptor().getHgExe(), "incoming", "--style",
      tmpFile.getCanonicalPath());
      + if (branch != null)

      { + args.add("-r", branch); + }

      +
      launcher.launch(

      • new String[] {getDescriptor().getHgExe(), "incoming", "--style", tmpFile.getCanonicalPath()}

        ,
        + args.toCommandArray(),
        EnvVars.masterEnvVars, new ForkOutputStream(baos, output),
        workspace).join();

      For issue #2:

      • if(branch!=null) args.add("-r",branch);
      • args.add(source,workspace.getRemote());
        + if(branch!=null) { + args.add(source + "#" + branch,workspace.getRemote()); + }

        else

        { + args.add(source,workspace.getRemote()); + }

            kohsuke Kohsuke Kawaguchi
            sfermigier sfermigier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: