[PATCH] mq: informative error instead of stack trace when qpush-ing to an earlier patch (issue2587)
Afuna Matata
afunamatata at gmail.com
Sat Feb 12 01:10:31 CST 2011
>
> > +now try it when a is unguarded, and we're at the top of the queue
> > + $ hg qsel block
> > + number of guarded, applied patches has changed from 1 to 0
> > + $ hg qpush b
> > + abort: cannot push to a previous patch: b
> > + [255]
> > + $ hg qpush a
> > + patch is earlier in the series. Try hg qpop 'a'
> > + [1]
> > +
>
> Can you explain why we should have two different messages and behavior here ?
> abort: cannot push to a previous patch: b
> patch is earlier in the series. Try hg qpop 'a'
>
> At best, a single test should cover all cases. At least, there shall be a
> unique error message.
>
> Regards.
> Gilles.
>
Good point. The only difference in both cases is that b is currently
applied, while a is unapplied. However, they both come earlier in the
patch series, and I agree that the single message should cover both
cases.
Let me see if I can whip up another patch that does that cleanly.
More information about the Mercurial-devel
mailing list