revsets and tags question
Harvey Chapman
hchapman-hg at 3gfp.com
Wed Nov 6 22:56:43 UTC 2013
Is there a better way than the following for finding the most recent tag (fitting a pattern) that is an ancestor of the currently checked out revision?
So, we’re looking for the most recent “tag_*” that the current working copy is a descendent of.
hg log --template '{tags}\n' -r 'last(ancestors(.) and tag("re:tag_.+"))’
So, after “hg update 9”, I should get “tag_6” and similarly I should get “tag_5” after updating to rev 8.
@ 9:ede25d59cea4 tip
|
| o 8:d563061ccc29
| |
o | 7:fb6ff949035e tag_6
| |
| o 6:81a389207fd8 tag_5
| |
o | 5:3015f96c36b6 tag_4
| |
| o 4:2756f8acd283 tag_3
| |
o | 3:f43ba35ab911 tag_2
| |
| o 2:98d964b74062 tag_1
| |
| o 1:ca95db347642
|/
o 0:4f19c9537cf5 tag_0
More information about the Mercurial
mailing list