[Bug 4116] wishlist request - please provide a way to check whether a commit is mq
Faheem Mitha
faheem at faheem.info
Sun Dec 1 19:16:09 UTC 2013
On Sun, 1 Dec 2013, mercurial-bugs at selenic.com wrote:
> http://bz.selenic.com/show_bug.cgi?id=4116
>
> Matt Mackall <mpm at selenic.com> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|UNCONFIRMED |RESOLVED
> CC| |mpm at selenic.com
> Resolution|--- |INVALID
>
> --- Comment #2 from Matt Mackall <mpm at selenic.com> ---
> Python hooks are unsupported and the internal "API" is unsupported -> closed.
>
> I recommend using the mq() revset. For instance:
>
> try:
> if repo.set('%d and mq()', myrev):
> print 'yep'
> else:
> print 'nope'
> except:
> print 'no mq extension?'
It doesn't look like this works in my use case.
print list(repo.set('%d and mq()', ctx))
always gives an empty set, regardless whether I'm qpushing or doing a
regular commit. I think the problem is that the code needs to be called
before the commit has completed so it can abort, but in this case the code
can't check for the commit because it isn't there yet. Perhaps something
more low level is needed.
Regards, Faheem
More information about the Mercurial
mailing list