1

I was playing around with some files (someone else's code mounted on the machine, I have to model my code after it) and short story: something went wrong. The page is printing the header twice, the error messages are going haywire, etc... I'm not sure what I did. I tried to undo all my changes, but it's not working. I must be missing something.

I didn't actually check in my code, but the changes were still kept. Is there anyway that I can just get back to the way the files were before I started playing around with them (i.e this morning)? I know about hg revert, but I'm not sure if it's a good idea; Mercurial seems pretty certain that I don't want to use revert... Like, ever.

Really frustrated with this, so I really appreciate any suggestions.

nv39
  • 535
  • 2
  • 12
  • 21
  • Revert sounds like the way to go to me. Check this question http://stackoverflow.com/questions/2773123/how-to-abandon-all-mercurial-changes-that-havent-been-committed – Jason Down Aug 02 '12 at 14:23

1 Answers1

1

The short answer is that yeah, just go ahead and use revert, that's what you want to do in this case. This question is not a duplicate of yours per se, but it explains some of the subtleties of using revert and similar Mercurial commands.

Community
  • 1
  • 1
Ernest Friedman-Hill
  • 80,601
  • 10
  • 150
  • 186
  • I reverted, but now I'm getting an Internal Server Error! – nv39 Aug 02 '12 at 14:40
  • Well, *that* sucks. I suspect it's unrelated, though. Revert is a client-side operation. Try checking out a small module in a different location, just to see if the server is working. – Ernest Friedman-Hill Aug 02 '12 at 14:43
  • Alternatively you could use `hg update -C .` to reset everything to its original state. That should be equivalent to `hg revert --all`. – Laurens Holst Aug 02 '12 at 15:38
  • thanks, that's good to know @Laurens! And it turned out to be an .htaccess problem; I had to remove the file. Thanks for the answer! – nv39 Aug 02 '12 at 17:11