When I unshelve, it uses mercurial's merge capability, but I'm not seeing any way to get back the original shelved patch and redo things if I've completed the merge with an error. Aside from searching backup drives, is there any way to do that? (either to undo the unshelve action and put the shelf back, or to see what was in the patch file)
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I found it — by looking around in the .hg
directory. Simply find the directory .hg/shelve-backup/
. The original patch is written there.
I now see this is mentioned in hg help unshelve
though I had missed it before now (and it does not say the name of the directory)
After a successful unshelve, the shelved changes are stored in a backup
directory. Only the N most recent backups are kept. N defaults to 10 but
can be overridden using the "shelve.maxbackups" configuration option.