Posts

Showing posts with the label Mac

Path environmental variable on mac

To view your paths in terminal type: $ echo $PATH To add a path for the duration of this terminal session type: $ export PATH=$PATH:/my/new/path Note: the $PATH: is important as it adds the new path to your existing one. Without $PATH: the existing path is overwritten with the new one. The disadvantage with this approach is that you modification to the path is lost when the terminal session ends. To add to the path for all users permanently you need to edit the paths file in /etc.  In terminal navigate to /etc. Type $ sudo pico paths Add your path. Type ^x (note: ^ = ctrl key). You'll be prompted to save. Type Y . To view your paths using echo $PATH you'll need to reopen the terminal to see your changes.

Installing Mercurial on iMac

Downloaded Mercurial 2.0.1 for MacOS X 10.7 from http://mercurial.selenic.com/downloads/. Ran the installer as usual. Mercurial installs to ' /usr/local/bin/' as the executable file 'hg'. Navigate to this in terminal and run the command 'hg version', should give you something like this if it's worked: Mercurial Distributed SCM (version 2.0.1+20111201) (see http://mercurial.selenic.com for more information) Copyright (C) 2005-2011 Matt Mackall 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. Then need to setup a username. Do this in an .ini style file called .hgrc. This needs to be in your home directory (~/), which in my case is '/Users/steve/', and contains the following: [ui] username = Steve Richmond That's it!

How to show hidden files in Finder

Follow this link: http://www.techiecorner.com/153/how-to-show-hidden-files-in-finder-mac-os-x/

Using Mercurial from QT Creator on a Mac

This is using Mercurial version 2.0.1 and QT Creator 2.3.1 and assumes Mercurial has already been installed and a .hgrc file setup with your username (see Installing Mercurial on iMac post). Start QT Creator and go to Preferences > Version Control and select Mercurial from the segment control. In Configuration enter for the Command enter: /usr/local/bin/hg In User enter the username and email in your .hgrc file (see Installing Mercurial on iMac post). I didn't do anything with the Miscellaneous section. Restart QT Creator and under the Tools menu Mercurial should appear and all the sub-menu items should be enabled.