hg diff/status always returns zero?

Stephen Rasku mercurial at srasku.net
Wed May 6 16:42:58 CDT 2009


On Wed, May 6, 2009 at 16:54, Kevin Bullock
<kbullock+mercurial at ringworld.org> wrote:
>
> You can also do this e.g. in bash:
> if [ ! -z "`hg status -admrn`" ]; then
>   # ...
> fi

That's cool.

I want to use this functionality in cron.  I can create a script
that's called by cron but with a status return I can do something like
the following in cron:

1 9-17 * * * (. .bashrc; cd $PROJECT; hg diff || pwd)

This will send me the diffs and then append the current working
directory to the e-mail.  If there is no diff then I don't get an
e-mail at all.

...Stephen



More information about the Mercurial mailing list