Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I know the current tag of Mercurial?

Tags:

mercurial

hgrc

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?

like image 945
harris Avatar asked Jul 25 '13 02:07

harris


People also ask

How do I know my Mercurial version?

If you already have Mercurial installed, make sure you have version 1.7 or later. To check, enter hg --version at the command line.

What is Mercurial tag?

A tag is a symbolic identifier for a changeset. It can contain any characters except ":" (colon), "\r" (Carriage Return) or "\n" (Line Feed). Mercurial has two kinds of tags: local and regular.

What is hg status?

hg status shows the status of a repository. Files are stored in a project's working directory (which users see), and the local repository (where committed snapshots are permanently recorded). hg add tells Mercurial to track files. hg commit creates a snapshot of the changes to 1 or more files in the local repository.


1 Answers

Latest tag in ancestors, using log and templating

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

like image 116
Lazy Badger Avatar answered Sep 27 '22 16:09

Lazy Badger