I know it is strange but I was updating my testcases and thought of removing all the untracked files from the testcase so ran hg purge, but apart from deleting untracked file it deleted tracked files for 230+ testcases too.
Is there any way to revert back to original or can I get the files back? These files are on the server so I can get it by pulling it from server, but this is not helpful as I have to update it again.
If you have modified Working Directory ("modified" by any way) you can easy discard changes and return to the state of clean "."-changeset using
hg up -C -r .And yes, follow-up to @torek,
hg purgemust not touch tracked files, because, according to its wikibut I can see one possible case, why its may happen. Next para in description sheds some light on topic:
(and some pure speculation below...)
If you had files in
.hgignoreand added these files into repository by hand (you canhg addignored files), purge probably may delete these files.You can (rather easy) verify my idea after returning to good state of repo
.hgignorehg purge --printin order to get list of purged files. If lists (deleted and ignored versoned files) will have intersections, then you'll get answer on question "Why?"I can't see any other reasons for such behavior of the extension.