Exception while moving chunks on shelves
Created originally on Bitbucket by chphilli (Chris Phillips)
This may already have been reported, but I'm not sure about it, so I wanted to ensure it's tracked.
I had a changeset that had too many different things going on in it, and I wanted to commit chunks from different files. So I created a shelf and moved all of my working changes into the shelf. So far so good.
Next I selected 2 chunks from one of the files in the shelf and copied them to the working set. The chunks were copied to the working set correctly, but instead of showing the shelf name and contents on the right, the shelf name now appeared as "Parse Error" and the shelf contents were missing.
Afraid that I was going to lose data at this point, I tried to "undo" the damage by copying the chunks from the working set back into the shelf, at which point I was given the "please report this exception" window. The exception text is copied below.
When I looked in .hg/shelves, I saw the shelf patch file, but the file contained only the two chunks that I copied back in later. My original set of changes was lost. (Fortunately they were still in the "undo" buffer of my editor, so I was able to restore them by hand.)
The exception text presented on trying to copy the chunks back into the shelf follows:
{{{ #!python ** Mercurial version (1.8.2). TortoiseHg version (2.0.3) ** Command: ** CWD: C:\src\AdPlatform ** Extensions loaded: fixfrozenexts, gestalt, kilnauth, kilnpath, big-push, kiln, caseguard, kbfiles, purge, mq, rebase, graphlog, churn, fetch ** Python version: 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit (AMD64)] ** Windows version: (6, 1, 7600, 2, '') ** Processor architecture: x64 ** Qt-4.7.1 PyQt-4.8.2 Traceback (most recent call last): File "tortoisehg\hgqt\shelve.pyo", line 231, in moveChunksRight File "tortoisehg\hgqt\chunks.pyo", line 217, in deleteSelectedChunks File "tortoisehg\util\hglib.pyo", line 74, in fromunicode File "encodings\cp1252.pyo", line 12, in encode UnicodeEncodeError: 'charmap' codec can't encode character u'\ufeff' in position 0: character maps to
}}}