[PATCH] hgext/mq - idempotent operations should return success

Peter Williams pwil3058 at bigpond.net.au
Wed Feb 7 02:06:55 UTC 2007


Alexis S. L. Carvalho wrote:
> Thus spake Ben Thomas:
>> One of the items that I've noticed in use of mq is that idempotent
>> operations return differing exit statuses.  This makes some scripted
>> operations more challenging. In general, I prefer that idempotent
>> operations that complete successfully return success.  An example,
> [...]
>> The attached patch makes a start at having idempotent operations
>> return success. The specific cases that I looked at were:
>>
>> hg qpush <xxx>
>> hg qpop <xxx>
>> hg qpush -a
>> hg qpop -a
> 
> I mostly agree with this, but I really think that qpush without
> arguments should return an error if it can't push another patch.
> Otherwise you'll break this usage:
> 
>     while hg qpush; do
>         something
>     done
> 
> Same thing for qpop - but the error message in both cases could probably
> be more friendly (see issue474).
> 
> Patches welcome :)  (especially if you can use hg export to generate
> them with author and commit message).

Do you have some mq patches applied to your repository?  The reason that 
I ask is that when I try to clone it get:

abort: prechangegroup.mq-no-pull hook exited with status 1

Peter
-- 
Peter Williams                                   pwil3058 at bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
  -- Ambrose Bierce


More information about the Mercurial-devel mailing list