#!/bin/rc
rfork n
if(! ~ $user glenda){
	echo 'be glenda'
	exit
}

if(! test -e /n/f/adm/users)
	mount /srv/cwfs /n/f
cd /n/f
if(! test -d .hg)
	bind -ac /dist/plan9front /n/f
if(! ~ $#* 0)
	hg $*
if not
	hg help | awk '
	/^add/ {p="help"; next}
	/^ [a-z]*/ {s=$0; sub(" *[a-z]* *","",s);
		if(p) printf("9hg help %-10s\t# %s\n", $1, s)
		else printf("9hg %-10s\t# %s\n", $1, s)
		next}
	'
unmount /srv/cwfs /n/f
exit

--------------

# some userful commands
pull
recover	# Recover from an interrupted commit or pull
update


hg options
--cwd path
change working directory
