Crash when creating a new branch with a name that existed before

Issue #5236 duplicate
Anonymous created an issue

!python

** Mercurial version (4.7.1).  TortoiseHg version (4.7.1)
** Command: 
** CWD: C:\Program Files\TortoiseHg
** Encoding: cp1252
** Extensions loaded: strip, mq, purge, rebase, share, evolve, tortoisehg.util.configitems
** Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=2, build=9200, platform=2, service_pack='')
** Processor architecture: x64
** Qt-5.9.2 PyQt-5.9.1 QScintilla-2.10.2.dev1711012104
Traceback (most recent call last):
  File "tortoisehg\hgqt\commit.pyo", line 600, in mqPerformAction
  File "tortoisehg\hgqt\commit.pyo", line 973, in commit
  File "tortoisehg\hgqt\commit.pyo", line 572, in getBranchCommandLine
  File "tortoisehg\hgqt\thgrepo.pyo", line 772, in __getitem__
  File "mercurial\localrepo.pyo", line 856, in __getitem__
  File "mercurial\context.pyo", line 439, in __init__
ProgrammingError: unsupported changeid 'Pel' of type <type 'str'>