0

I'm using Mercurial and TortoiseHG and basically I want to revert to version 298 (currently on 315) revert some erased files and put my self back again on version 315 but without losing information regarding recovered files. Is this possible?

1 Answers1

2

The preferred course of action depends a bit on the details of the situation which you do not describe. However in neither case you need to checkout r298:

a) Commit 298 shall be reverted in its entirety, that is it ONLY erases the files you want restored. Then simply use

hg backout -r298

b) Only some files erased in r298 shall be restored. Revert those files to the state they were in r298:

hg revert -r298 FILENAME

and do that for each FILENAME which you want to restore.

If you need to see which files were changed, erased and added, make use of hg log -r298 --stat

planetmaker
  • 5,884
  • 3
  • 28
  • 37