typically non-zero exit codes are reserved for unexpected failures. doing a
pull and not getting anything when no changes have been submitted isn't really
unexpected.
It's easy enough to make a check to see if there was no submits anyway if a
message is printed.
hg pull ... | grep "No new checkins"
for example.
Another way would be to actually print some sort of error code like apache
does. Apache doesn't really have a failure itself if a document doesn't exist,
but it prints a 404.
so maybe:
hg pull ... | grep "404: No new checkins"
which can obviously be reduced to
hg pull ... | grep 404
This may be good to use where error messages may change, but codes usually
remain static. |