Defect #27790

mercurial: error of double quotes in branch and tag names

Added by Alexander Ryabinovskiy over 2 years ago. Updated 3 months ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:4.2.0
Resolution:Fixed Affected version:

Description

Hello.
I have redmine 3.4.3 installation.
Redmine can`t handle mercurial branches with double quotes, it throws an error after parsing with ActiveSupport::XmlMini.parse(xml):

hg: error during getting info: undefined method `[]' for nil:NilClass

because "xml" variable contains string like this:
<branch revision=\"138\" node=\"8a17814e772e4a41b9c2480e047dce7d9181a39e\" name=\"\"TestBranch\"\"/>

My solution is to replace double quotes in branch name with

&quot;
in redminehelper.py, .patch is in attach.

redmine_redminehelper_fix.diff Magnifier (968 Bytes) Alexander Ryabinovskiy, 2017-12-13 11:55

Associated revisions

Revision 19765
Added by Toshi MARUYAMA 3 months ago

scm: mercurial: escape branch and tag names (#27790)

Revision 19766
Added by Toshi MARUYAMA 3 months ago

scm: mercurial: add double quote branch and tag name to test repository (#27790)

Revision 19768
Added by Go MAEDA 3 months ago

Fix a RuboCop offense Layout/TrailingWhitespace due to r19766 (#27790).

History

#1 Updated by Toshi MARUYAMA 3 months ago

  • Tracker changed from Patch to Defect
  • Subject changed from mercurial - fix double quotes in branch names to mercurial: error of double quotes in branch and tag names
  • Status changed from New to Closed
  • Target version set to 4.2.0
  • Resolution set to Fixed

Fixed by r19765.

Also available in: Atom PDF