Hg equivalent svn info

I am switching from svn to hg. Each of my individual projects is in its own subdirectory. In my svn projects, I computed the integer version of no. project by running svn information from the Makefile. Is there an hg equivalent for this that will let me know the version # of each project in its own subdirectory? I looked at the hg summary, but it just looks like the # version of the entire repository, not the directory where the command is running.

TY, Fred

+6
source share
3 answers

Try the following:

hg id 

or if you really want to get a fantasy:

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

which, if you flag releases, gets you something like this:

 1.0.1-10-6746879deadbeef05 
+5
source

I don’t think there is one team. Previous answers focused on displaying the status of the repo tip. Add

 hg paths 

for repo url.

+3
source

You can also try

 hg log -r . 

for a better conclusion.

+1
source

Source: https://habr.com/ru/post/896049/


All Articles