version control - Get revision number of a tagged file in WinCvs -


this seems should simple, can't find solution appears work...

i need cvs command given name of tag have applied file, give revision number.


cvs tree structure:

(filename)     |     +--> 1.1-----(branch)           |         |           |      1.1.1.1---(tag1)           |         |           |      1.1.1.2---(tag2)           |         |           |      1.1.1.3---(tag3)           |         |           |         :          1.2           |           |           : 

for example: using cvs command, given tag name "tag2", how can cvs give me revision number "1.1.1.2"?


the closest thing can find using log command -q flag, still gives me more information need.

ex: cvs -q log -h filename

passing tagname log command seems have no effect.


cvs version information:

enter image description here


my current solution use perl script parse output log command there has simpler way...

passing tag name (with -r option) log command have effect, not particularly useful 1 , it's effect hidden "-h".

usually easiest way revision number version file (the normal use-case this) include keyword in it; ie:

# thu 21 may 08:40:59 bst 2015 thisrev="$revision$" 

note: repository version number version file must committed every time make commit repo.

if need revision specific file you're falling on scripting "symbolic names" part of log. r-1-0-0 this:

cvs -q log -h version | awk '/^\tr-1-0-0:/ {print $nf;}' 

there's no direct equivalent of git describe command.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -