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

B Thomas bjthomas3 at gmail.com
Wed Feb 7 15:58:04 UTC 2007


Excellent point, thank you.

Is the attached closer to what you'd like to see ?

-b


On 2/6/07, Alexis S. L. Carvalho <alexis at cecm.usp.br> 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).
>
> Alexis
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20070207/51b08d0f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mq-qpush.patch
Type: text/x-patch
Size: 3376 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20070207/51b08d0f/attachment.bin>


More information about the Mercurial-devel mailing list