hg-dude is a simple Mercurial desktop notifier. It monitors hg repositories in current directory for new commits/branches/tags and shows desktop notification if anything new arrived.
How it works
It simply uses
hg incoming and parses its output to see what has changed.
Then it shows desktop
kdialog (Linux) or
growlnotify (OSX). All
of this in infinite loop.
How does it look
notify-sendon Gnome (Fedora: libnotify package, Ubuntu: libnotify-bin package)
kdialogon KDE (included in KDE)
growlnotify, from Growl Extras (Homebrew: growlnotify package)
$ curl -skL https://github.com/erjiang/hg-dude/raw/master/hg-dude >~/bin/hg-dude $ chmod +x ~/bin/hg-dude
* Make sure
~/bin is in your
$PATH or put
hg-dude script somewhere else
hg-dude iterates over repositories that live inside the dude directory. This directory is nothing more than container for cloned repositories of projects you want to watch. Name it like you want, here for example we use ~/.hg-dude:
$ mkdir ~/.hg-dude $ cd ~/.hg-dude
Clone some repositories:
$ hg clone ssh://email@example.com/pypy/pypy $ hg clone ssh://firstname.lastname@example.org/jespern/django-piston
Symlinked repositories work too. This way you can monitor already cloned projects:
$ ln -s ~/code/tmuxinator .
Now run this to monitor pwd:
You can also pass directory name as first argument to specify which directory to monitor instead of pwd.
$ hg-dude ~/watched-repos
This way you can have multiple dude directories each being monitored by separate hg-dude process.
Set how often hg-dude should check for changes (in seconds, default: 60):
$ export HG_DUDE_INTERVAL=30
Set path to icon used by desktop notifications (default: none):
$ export HG_DUDE_ICON=~/my_icon.png
Eric Jiang (http://ericjiang.com/ @ericrjiang)
Based on git-dude by Marcin Kulik (http://ku1ik.com/ | @sickill)