After having serious troubles with files as a web developer, I decided to use Source Control Management Tool. After long research, I decided to go for Mercurial. But cant even install it :S I'm a real dummy about these Source Control, Terminal stuffs :/

  1. I have Mac OS X 10.6, so I download Mercurial 1.4.3 for OS X 10.6 from http://mercurial.berkwood.com/
  2. I install the downloaded file mercurial-1.4.3+20100201-py2.6-macosx10.6.mpkg
  3. Than, I open Terminal and run hg --version to make sure it's installed. and it says

hg: command not found

I even cant make the first step, so how will i use this Mercurial :/ I spent maybe 2 weeks for trying to install this, but no way I could!

do you guys know any video or installation guide for a REAL DUMMY as me?

appreciate!

link|improve this question

25% accept rate
It really says " hd : command not found" when you type " hg --version"? – KennyTM Feb 6 '10 at 13:37
sorry, it says hg, not hd. my bad spelling at post. just edited. – artmania Feb 6 '10 at 13:38
This is an installation issue, not a programming issue, so I think it goes in SuperUser. In any case, I just downloaded it for 10.5, double-clicked on the mpkg file, clicked on anything that said "Continue" or "Agree" or "Install", and it worked. I think step 2 needs more clarification before anybody can help you. – David Thornley Feb 6 '10 at 13:44
at Terminal, do I have to be under any particular path to run this hg comments? or do I actually first have to run anything about Mercurial to make it work? or does it just works? – artmania Feb 6 '10 at 13:50
feedback

migrated from stackoverflow.com Feb 7 '10 at 13:29

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

1 Answer

Mercurial installs itself in /usr/local/bin, so the executable you want is /usr/local/bin/hg. You just need to add that directory to your PATH variable, i.e. do something like

export PATH="/usr/local/bin:$PATH"

somewhere in your shell profile (.profile, .bashrc, .zshrc).

PS: I only ever used Mercurial once, a week ago, and this particular information is displayed during installation, and again available as part of the package documentation. Not very hard to find :)

link|improve this answer
aha! after I run the comment you said, hg --version worked!! it said "Mercurial Distributed SCM (version 1.4.3+20100201) Copyright (C) 2005-2010 Matt Mackall <mpm@selenic.com> and others. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." so, it means MErcurial is working? hmmm, now I need to find out more about Mercurial comments i guess – artmania Feb 6 '10 at 14:06
whooaaa! do I have to do this export PATH="/usr/local/bin:$PATH" everything i need to work with mercurial? I closed Terminal, than opened again and hg didnt work again. after I make this export PATH="/usr/local/bin:$PATH", it worked. so this export comment is sth to run mercurial? do i have to do all the time? – artmania Feb 6 '10 at 14:49
1  
as the OP noted, you need to put that line in your profile. If you don't know how to add it, just type this in a new terminal window "touch ~/.bash_profile && open -e ~/.bash_profile". That will open it up in text edit and you can paste the "export PATH..." command in there and save it. Open a new terminal window and you're good to go for all future terminal sessions. – Ted Naleid Feb 6 '10 at 17:01
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.