The ns-3 source control management of choice is Mercurial.
Installing Mercurial on OS X is not an issue, just download the package and install it. Simple as that.
Once installed, you can use a terminal to give all the commands you want, or even use a GUI (see Mercurial Mac native GUIs).
What I missed the most, however, is the ability to auto-complete commands from the terminal.
In Linux you can write "hg p" and hit tab. The result is:
tommaso:ns-3-dev pecos$ hg p
parents patch paths phase pull push
or even... "hg push --move" + tab:
tommaso:ns-3-dev pecos$ hg qpush --move
Ndisc.diff TagFragmentation.diff issue6821106_36001.diff
Handy... but it's not working on OS X. However there is a way to enable it. And it's easy too.
- Download the mercurial source tarball (http://mercurial.selenic.com/downloads) and choose "Mercurial xxxx source release" where xxxx is the latest version;
- Unpack the file, and open the folder. Open the folder named "contrib";
- Copy the file named bash_completion somewhere (e.g., $HOME/bin);
- Modify the bash profile to source it;
- Reopen your terminals and enjoy.
The commands to give are:
tommaso:~ pecos$ cd ~
tommaso:~ pecos$ cp Downloads/mercurial-2.9.1/contrib/bash_completion ~/bin
tommaso:~ pecos$ nano ~/.profile
and add the following line to .profile:
source $HOME/bin/bash_completion
Note that in some systems ".profile" could be named ".bash_profile". It's the same stuff.
If you're a terminal guy (like me) you'll really enjoy it.
No comments:
Post a Comment