Importing patch from clipboard fails.
Created originally on Bitbucket by chphilli (Chris Phillips)
I'm trying to use the "copy patch" feature in one clone, and then use the Import -> from clipboard in another clone, but it always fails with an error like the following:
{{{ % hg import --no-commit --repository C:\src\repo --verbose -- c:\users\chris\appdata\local\temp\thg-import-cdbu0g.patch applying c:\users\chris\appdata\local\temp\thg-import-cdbu0g.patch patching file repo/path/test.cs Hunk #1 (closed) FAILED at 267 Hunk #2 (closed) FAILED at 317 Hunk #3 (closed) FAILED at 391 Hunk #4 (closed) FAILED at 424 4 out of 4 hunks FAILED -- saving rejects to file repo/path/test.cs.rej abort: patch failed to apply [command returned code 255 Fri Apr 15 09:09:14 2011] }}}
I've tried this process a few times now for different patches with no success. It doesn't seem to matter whether I import to the repository, a shelf, the working copy, or patches.
However, if I paste the copied patch into a file and import from that, the process works correctly.
After typing this up, I realized that I do use a clipboard manager called "ditto" (http://ditto-cp.sourceforge.net/) which I suppose may be fouling things up. However, it would be nice if this feature still worked properly in these situations. If that's not possible, what about providing a place to paste the patch manually instead of or in addition to trying to import directly from the clipboard?