Issue #1288 resolved

brachnames with mutlibyte characters are collapsed in BranchOpDialog

Anonymous created an issue

After selecting "Open a new named branch", I can see a combo box with branch names. But the branch names with multibyte character are garbled .

I've read a "brachop.py" and found some lines that could be cause of this issue. following lines are the code that I found.

52            wbu = hglib.tounicode(wctx.branch())
53            for name in repo.namedbranches:
54                if name == wbu:
55                    continue
56                branchCombo.addItem(name)
57            branchCombo.activated.connect(self.accept)

Current branch name is converted to unicode in line 52, but the list of branch names are not converted to unicode in line 53. This could be fail the branch name matching between current and the list in line 54.

And also the branch names adding to the combo box are not converted to unicode in line 56.

Codes to fix this issue might be the followings.

52            wbu = wctx.branch()
56                branchCombo.addItem(hglib.tounicode(name))

I've found similar codes in 5 files. 3 files might have the same issue and the rest are not.

  • branchop.py NOT tounicode before addItem to combo box
  • thgstrip.py NOT tounicode before addItem to combo box
  • update.py NOT tounicode before addItem to combo box
  • repofilter.py using tounicode before addItem to combo box
  • sync.py using tounicode before addItem to combo box

Comments (3)

  1. Log in to comment