Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used Mercurial on my old computer without any trouble a month ago, but it broke on Friday and I needed to reinstall. Now when I try to do anything from my repository directory I get the error:

'hg' is not recognized as an internal or external command, operable program or batch file.

When I try to do anything from the Mercurial directory it gives me the error

abort: There is no Mercurial repository here <.hg not found>!

I've updated the hgrc file with my info if that makes a difference. How can I get this working?

share|improve this question

migrated from May 25 '11 at 2:48

This question came from our site for professional and enthusiast programmers.

add the location of mercurial to your PATH. – Anonymous May 25 '11 at 2:40
im going to sound stupid, but how do i do that? – Anonymous May 25 '11 at 2:42
What operating system are you using? Windows? Mac OS X? Some flavor of Linux? – Lawrence Velázquez May 25 '11 at 2:53

it sounds like your "path" environment variable doesn't include mercurial executables. therefore, you can probably append something like: "C:\Program Files (x86)\Mercurial\" (assuming windows). you could also specify the full path to hg.exe "C:\Program Files (x86)\Mercurial\hg.exe" followed by any arguments.

the second scenario is because you are in the mercurial directory (which includes hg.exe, so doesn't depend on path anymore). but, it is not a repository and you get the ".hg not found".

hope that helps.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.