Better handling of Mercurial branches

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      I have some suggestions to improve the current sequence of hg commands issued by
      the Mercurial plugin.

      Currently we have:

      hg incoming --quiet --bundle hg.bundle --template [blah...] -r $branch
      hg pull -u hg.bundle ## ( this command doesn't specify which branch the working
      copy should be brought to )

      I think this would be better:

      hg incoming --quiet --bundle hg.bundle --template [blah...] -r $branch
      hg pull hg.bundle ## ( instead of 'hg pull -u hg.bundle' )
      hg update -C -r $revision ### ( this command should bring the working copy to
      the tip of the specified branch )

      On the Java side, instead of

      if (branch!=null) args.add("-r",branch);
      else args.add("-r", "default");

      I suggest this:

      if (null == branch || branch.trim().length() == 0)

      { // Excplicitly select the default branch branch = "default"; }

      // It's safer to ALWAYS specify which branch to use
      args.add("-r", branch);

            Assignee:
            Jesse Glick
            Reporter:
            Elifarley
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: