Installing Mercurial on Mac OS X 10.6

308

Solution 1

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 :)

Solution 2

I had to do this:

go download the proper version of mercurial (mac didn't have it)

https://www.mercurial-scm.org/downloads

Make sure you grab the version of your MAc then not only make sure it's in your path like F'x said, but also make sure you have an alias set for it to execute from any directory:

alias hg=/path/where/mercurial/installed

for me it was

/usr/local/bin/hg

Hope this helps someone. It took me an hour to figure out.

Share:
308

Related videos on Youtube

bjxt
Author by

bjxt

Updated on September 17, 2022

Comments

  • bjxt
    bjxt almost 2 years

    My question is how do we pass back the mmap'd area back to the module so that it can manipulate that memory.

    What I am looking for is this:

    1. My user space application runs using several hundred threads (so its hard to keep track of which buffer the kernel has given to which user-space thread).
    2. The user thread calls mmap function of the module and after getting it, it fills the buffer with data.
    3. Then it has to pass this buffer to the module using ioctl() to the module so that the module does some processing and modify the buffer.
    4. User space thread reads the new data

    I'm not sure as to how "step 3" can be implemented. Is there anyway to pass this user-buffer to the module so that it knows which address it is in the kernel space?

    (I can't use malloc or copy_from_user)

    • Admin
      Admin over 14 years
      It really says " hd : command not found" when you type " hg --version"?
    • Admin
      Admin over 14 years
      sorry, it says hg, not hd. my bad spelling at post. just edited.
    • David Thornley
      David Thornley over 14 years
      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.
    • Admin
      Admin over 14 years
      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?
  • Admin
    Admin over 14 years
    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 <[email protected]> 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
  • Admin
    Admin over 14 years
    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?
  • Ted Naleid
    Ted Naleid over 14 years
    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.