How to recover files that have been deleted from shelf in tortoisehg program?
Asked Answered
V

1

28

I was trying to delete an individual file from my shelf and it turns out the delete button deletes all of the files in the shelf instead. Is there a way to recover these files besides going into .hg/Trashcan and trying to remember which of those files were deleted?

Vaccinia answered 28/6, 2013 at 19:46 Comment(1)
I don't know for a fact, but your question saved me from losing some sleep. I made the same mistake but was able to recover the files from the trashcan.Blakley
C
34

The best way to do this, as you alluded to, is to go into the .hg/Trashcan and copy the shelf file back into the .hg/shelves folder. Obviously if you order or list the trashcan folder by date you should be able to see which was the one you deleted by accident!

The .hg folder indicates the location you have clones your repository to. The Trashcan folder is inside it (may be hidden on some machines). The folder does not get created until you have deleted something.

Capacitor answered 2/4, 2014 at 12:27 Comment(2)
Wish I could upvote this everytime I come here. See you in a couple of months.Vapid
For completion, recover using hg import --no-commit [NAME].patch.Wentletrap

© 2022 - 2024 — McMap. All rights reserved.