incoming exit status

Vadym Chepkov vchepkov at gmail.com
Wed Nov 10 12:27:48 CST 2010


On Nov 10, 2010, at 1:19 PM, Haszlakiewicz, Eric wrote:

>> -----Original Message-----
>> From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com]
>> 
>> I noticed hg incoming returns 1 if there are no any incoming changes.
>> What is the reason? I don't think it's an error condition and it breaks
>> ability to automate unattended builds.
> 
> I think it's specifically so you can easily distinguish between the changes-available and no-changes-available cases.  I have scripts that depend on this so I don't have to try to decode the output, which would be very sensitive to the exact messages emitted and thus error prone.
> Actual errors cause hg to exit with a return value higher than 1.
> 
> eric
> 

well, that does't work well with shell's "set -e"

and you can rely on output if you specify template, at least I would expect it will be predictable
hg -q incoming --template "{rev} {files}\n" 

either you have output or not, no? 

Vadym




More information about the Mercurial mailing list