Mercurial branches with spaces not correctly escaped getting changelog

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

XMLWordPrintable

      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.

            Assignee:
            Jesse Glick
            Reporter:
            Stefano Moser
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: