Error importing patch from clipboard
Created originally on Bitbucket by bozr
{{{ #!python ** Mercurial version (1.9.3). TortoiseHg version (2.1.4) ** Command: --nofork workbench ** CWD: C:\Repositories\Spare1\src ** Encoding: cp1252 ** Extensions loaded: extdiff, purge, rebase, fetch, transplant, mq ** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] ** Windows version: (5, 1, 2600, 2, 'Service Pack 3') ** Processor architecture: x86 ** Qt-4.7.1 PyQt-4.8.3 Traceback (most recent call last): File "tortoisehg\hgqt\thgimport.pyo", line 196, in getcliptext File "tortoisehg\util\hglib.pyo", line 115, in fromunicode File "encodings\cp1252.pyo", line 12, in encode UnicodeEncodeError: 'charmap' codec can't encode character u'\ufeff' in position 262: character maps to
}}}
Using thg 2.1.4.
Steps to reproduce:
- Copy uncommitted changes from repo 1 to patch using "Copy patch" context menu
- Select repo 2
- Via the menu Repository -> Import .. click the import from clipboard button
- See the above crash dialog :-)
This crash doesn't occur in case the patch on the clipboard is saved to file and this file is imported using the browse button.