Peter
Peter

Reputation: 3679

Mercurial revset for finding next tag after a commit

How do I find the next tag after a specific changeset revision?

For example if a bug was introduced in changeset abcdef123456, how do I find the first release (tag) that included this bug?

I assume I can use HG revsets for this somehow.

Upvotes: 2

Views: 161

Answers (1)

Peter
Peter

Reputation: 3679

hg log -r "first(abcdef123456:: and tag())"


Or for filtering releases to tags that match a special regular expression:

hg log -r "first(abcdef123456:: and tag(r're:Release'))"

Upvotes: 6

Related Questions