Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hg equivalent of svn info

Tags:

mercurial

I'm switching from svn to hg. Each of my separate projects is in it's own subdirectory. In my svn projects I was calculating the integer version no. of a project by running svn info from a Makefile. Is there an hg equivalent for this, that would let me know the version # of each project in it's own subdirectory? I've looked at hg summary, but that just seems to give the version # of the whole repository, not the directory the command is run in.

TY, Fred

like image 455
fred basset Avatar asked Aug 27 '11 21:08

fred basset


2 Answers

Try this:

hg id

or if you really want to get fancy:

hg log --template '{latesttag}-{latesttagdistance}-{node}' -r .

which, if you're tagging releases gets you something like this:

1.0.1-10-6746879deadbeef05
like image 186
Ry4an Brase Avatar answered Sep 27 '22 01:09

Ry4an Brase


I don't think there is a single command. The previous answers focused on displaying the status of the repo tip. Add

hg paths

for repo's URL.

like image 38
Piotr Avatar answered Sep 26 '22 01:09

Piotr