hg diff/status always returns zero?

Kevin Bullock kbullock+mercurial at ringworld.org
Wed May 6 15:54:06 CDT 2009


On 6 May 2009, at 2:55 PM, Stephen Rasku wrote:

> On Wed, May 6, 2009 at 15:32, Ted Pavlic <ted at tedpavlic.com> wrote:
>>
>> The answer to these questions will vary from hg user to hg user,  
>> and so it's
>> probably best to parse the output. For example...
>>
>> hg st|grep -q '^\(M\|D\|R\|!\|C\)'
>>
>> or something similar...
>
> I can get this to work for me.  It's not as clean but I suppose it's
> more flexible.

You can also do this e.g. in bash:

if [ ! -z "`hg status -admrn`" ]; then
   # ...
fi

Pacem in terris / Mir / Shanti / Salaam / Heiwa
Kevin R. Bullock


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20090506/d78823c8/attachment.htm 


More information about the Mercurial mailing list