Currently I have a whole bunch of Mercurial repositories in a directory. All of these are cloned from a central repository that the team pushes their changes to. I like to generally keep my local repositories up-to-date so that I can review changes. Manually running hg incoming -R some_directory on 20 different projects is a lot of work. So I automated it with a simple shell script.
This script will run incoming (or outgoing) on all of the local repositories and print the results to the console. Then I can manually sync the ones that have changed if I want.
I called this file hgcheckall.sh and run it like: ./hgcheckall.sh incoming
I guess the next major improvement would be to capture the output and then automatically sync the ones that have changed, but I haven't gotten around to that yet.