Is there a way to get a mercurial shelf back after a merge mistake?

时光总嘲笑我的痴心妄想 提交于 2020-01-05 02:32:07

问题


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.


来源:https://stackoverflow.com/questions/49457264/is-there-a-way-to-get-a-mercurial-shelf-back-after-a-merge-mistake

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!