Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use the embedded hg command line in SourceTree?

I'm really happy that SourceTree has Mercurial embedded. On the odd occasion I would like to run an hg command from the CLI, like

hg status 

To which I get

hg: command not found

Can I make modifications to my environment path to get the command line working for the embedded version, or do I have to install and manage a separate instance of Mercurial if I want to accasionally use the command line?

I'm using SourceTree OS X version 1.7.2

(This might be a superuser question, but I thought this community has a better chance of knowing and responding.)

like image 708
Jannie Theunissen Avatar asked Nov 11 '22 21:11

Jannie Theunissen


1 Answers

The binary lies within SourceTree's bundle, in the resources-folder and is called hg_local.

/Applications/SourceTree.app/Contents/Resources/mercurial_local

You might want to alias it somewhere else (like /usr/local/bin) and rename it on the go:

ln -s /Applications/SourceTree.app/Contents/Resources/mercurial_local /usr/local/bin

It might be a better idea to use some package manager and install mercurial from their repositories, eg. Homebrew. This can be done within few minutes and you gain easy access to lots of other command line tools you might want.

# First install homebrew, than run this command
brew install mercurial
like image 145
Jens Erat Avatar answered Dec 09 '22 10:12

Jens Erat