+
+ # get current mercurial tip via hg itself and install it in $HOME
+ gethgclone() {
+ setopt local_options
+ setopt errreturn
+ if [ -f mercurial-tree/.hg ] ; then
+ cd mercurial-tree
+ echo "Running hg pull for retreiving latest version..."
+ hg pull
+ echo "Finished update. Building tree now..."
+ make local
+ echo "Setting \$PATH to $PWD:\$PATH..."
+ export PATH="$PWD:$PATH"
+ else
+ hg clone http://selenic.com/repo/hg mercurial-tree
+ cd mercurial-tree
+ make local
+ echo "Setting \$PATH to $PWD:\$PATH..."
+ export PATH="$PWD:$PATH"
+ # echo "Setting \$PYTHONPATH to PYTHONPATH=\${HOME}/lib/python,"
+ echo "make sure you set it permanent via ~/.zshrc if you plan to use it permanently."
+ # export PYTHONPATH=${HOME}/lib/python
+ fi
+ setopt LOCAL_OPTIONS
+ }
+
+ fi # end of check whether we have the 'hg'-executable
+
+ # get and install current mercurial snapshot in $HOME
+ gethgsnap() {
+ setopt local_options
+ setopt errreturn
+ echo "Downloading mercurial snapshot"
+ wget http://www.selenic.com/mercurial/mercurial-snapshot.tar.gz
+ tar zxf mercurial-snapshot.tar.gz
+ cd mercurial-snapshot/
+ $SUDO apt-get update
+ $SUDO apt-get install python2.4-dev
+ make local
+ # make install-home-bin
+ echo "Setting \$PATH to $PWD:\$PATH..."
+ export PATH="$PWD:$PATH"
+ # echo "Setting \$PYTHONPATH to PYTHONPATH=\${HOME}/lib/python,"
+ # export PYTHONPATH=${HOME}/lib/python
+ echo "make sure you set it permanent via ~/.zshrc if you plan to use it permanently."
+ # echo "Notice: make sure \$HOME/bin is inside \$PATH!"
+ }