tags:

views:

79

answers:

1

Hi Guys, Mercurial newbie here, I have a simple question.

I deleted one of my files from Mercurial and I want to get it back. I used to do svn up in Subversion, but in Mercurial it doesn't work, I tried hg up, and it does nothing. I tried hg up to a specific file, and surprisingly (to me..) it told me:

abort: unknown revision '74656d706c617465732f6c6f67696e2e68746d6c'!

I tried to specify a revision and it told me:

abort: please specify just one revision

Isn't there a simple way of doing what I want?

+3  A: 

Use hg revert.

hg revert -r REV path/to/file

where REV is the revision of the repository that contains the file you want to recover. See hg help revert for details.

Niall C.
and `hg status` to find out what the status is, it probably shows up as missing (`!`).
tonfa
Thanks, it worked :)
apple_pie