How to programatically get the latest commit date on a CVS checkout -


For a script I am working to implement bifurcation using CVS, I have to find out that What's the 'timestamp'? Current checkout In other words, if I am on a branch / tag, then I should know that the previous timestamp was assembled for that branch / tag. If I'm on the head, then I want to know the last timestamp on the head.

I know this is not a 100% guarantee, because CVS checkouts can file different timestamps / modifications / ... but one-on-one-of-most case solutions are right by me Are there.

Knightley, I thought

  cvs log -n | Grep ^ dated: | Sort | Tail-n1 Cut-d \; -f1  

It was going to do this, but it has come to know that it goes through the entire history, for all the branches / tags.

CVS files on different timestamps on branches, any time to get the information for the branch The accuracy of choosing a file is hardly worth it.

However, it may be better that if there is some file that will change often, for example, in one of my bases, there is a version.h file that changes each version ( Minor or major). It can be used for timing information on the current version (it is not perfect for all the files in the branch, but it gives a lower line).

Therefore, if you know a file that can give you a bottom row value,

  CVS log path / to / version.h -r branch / tag | Grep ^ date | Sort | Tail-1  

will give you the final timestamp for that file.


If you can tell the complete file set of this type,

  find / base / diary-type grap-V CVS & gt; Files.txt  

Then, you can find the cvs command given above for each file,

  rm -f allFiles.txt $ f (& Lt; files.txt); CVS log $ F ... etc ... tail-1 & gt; & Gt; Sort.file.txt like AllFiles.txt | Tail-1  

This type of last line will give you the exact date for the most recently committed. Hey, you will not get the name of the file (which can be done with anything more fu)


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -