user1758415
user1758415

Reputation: 371

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

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?

Upvotes: 28

Views: 5028

Answers (1)

Remlap21
Remlap21

Reputation: 901

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.

Upvotes: 34

Related Questions