Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial/Kiln how can I get a deleted file without affecting my other files?

I have a file that was deleted a few changesets ago. As you can imagine, the other files in my project have changed since then. How can I get back that file (it's actually 2 files) without reverting all the other source files?

like image 769
Pete Avatar asked Apr 11 '11 19:04

Pete


1 Answers

Use hg revert for just that file:

hg revert -r REV path/to/deleted/file

From the help for hg revert

If a file has been deleted, it is restored. If the executable mode of a file was changed, it is reset.

If names are given, all files matching the names are reverted. If no arguments are given, no files are reverted.

like image 81
Niall C. Avatar answered Nov 15 '22 12:11

Niall C.