mercurialhgrc

How do I know the current tag of Mercurial?


Now, I am getting vim source code by Mercurial (hg):

root@flyingfisher-virtual-machine:/work/ABC/VIM_HG# hg tags |more
tip                             5228:3f65dc9c8840
v7-4a-039                       5227:a08fa2919f2b
v7-4a-038                       5225:8f983df0299f
v7-4a-037                       5223:91d478da863e
v7-4a-036                       5221:9982ec574beb
v7-4a-035                       5218:4ceacc1b0054
v7-4a-034                       5216:947edb6335d1
v7-4a-033                       5214:fa024ce48542
v7-4a-032                       5212:2741b46e96bf
v7-4a-031                       5210:839ebe7c1b2f

then

root@flyingfisher-virtual-machine:/work/ABC/VIM_HG# hg update v7-4a-018
216 files updated, 0 files merged, 0 files removed, 0 files unresolved

After several hours, how do I know which tag I was worked on?

Is there some Mercurial command tell the current tag information?


Solution

  • Latest tag in ancestors, using log and templating

    hg log -r "." --template "{latesttag}\n"