1. TortoiseHg
  2. TortoiseHg
  3. thg
  4. Issues
Issue #3246 resolved

Copy bug

Ben Henning
created an issue

When trying to copy a URL into the source URL bar on the clone repository dialog it causes the application to crash. This is reproduceable and can be worked around by manually typing in the same address, without copying and pasting it.

** Mercurial version (2.6.2).  TortoiseHg version (2.8.1)
** Command: --nofork clone
** CWD: C:\Users\Ben\Desktop\Enso
** Encoding: cp1252
** Extensions loaded: mercurial_keyring
** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)]
** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')
** Processor architecture: x64
** Qt-4.8.4 PyQt-4.9.6 QScintilla-2.7
Traceback (most recent call last):
  File "tortoisehg\hgqt\clone.pyo", line 287, in composeCommand
  File "tortoisehg\hgqt\clone.pyo", line 236, in getSrc
  File "tortoisehg\util\hglib.pyo", line 70, in fromunicode
  File "encodings\cp1252.pyo", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\u200b' in position 44: character maps to <undefined>
Traceback (most recent call last):
  File "tortoisehg\hgqt\clone.pyo", line 468, in onUrlHttps
  File "tortoisehg\hgqt\clone.pyo", line 236, in getSrc
  File "tortoisehg\util\hglib.pyo", line 70, in fromunicode
  File "encodings\cp1252.pyo", line 12, in encode
UnicodeEncodeError: 'charmap' codec can't encode character u'\u200b' in position 44: character maps to <undefined>

Comments (8)

  1. Yuya Nishihara

    Idea:

    If CloneDialog keeps paths in unicode, and if cmdui.Runner receives command-line arguments in unicode, cmdui can check invalid characters and display more comprehensible warning than traceback. Client widgets will no longer worry about HGENCODING.

  2. Log in to comment