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

Mercurial branches with spaces not correctly escaped getting changelog

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: mercurial-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.649, Windows 10 x64
    • Similar Issues:

      Description

      When cloning a repository with a branch name that contains spaces the polling fails with:

      hg parsing error at 4: invalid token

      after the "hg log" command getting changelog.

      The problem seems related on how hg parses the command line and escaping of the console and hg.
      For example:

      hg log --rev "branch with spaces"

      will work, but:

      hg log --rev "branch with spaces" --follow
      or:
      hg log --follow --rev "branch with spaces"

      will not (with the same error reported). A typical "hg log" command generated with mercurial-plugin is like this command (with many other parameters).

      The correct command should be something like:

      hg log --rev '"branch with spaces"' --follow ...etc...

      using single quotes for the console and double quotes for the hg/python parser.

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            I think a duplicate of something fixed recently.

            Show
            jglick Jesse Glick added a comment - I think a duplicate of something fixed recently.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                stemos Stefano Moser
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: