{"id":35,"date":"2007-06-13T20:01:56","date_gmt":"2007-06-14T04:01:56","guid":{"rendered":"https:\/\/www.wkiri.com\/today\/?p=35"},"modified":"2007-06-13T20:02:25","modified_gmt":"2007-06-14T04:02:25","slug":"cvs-goodies","status":"publish","type":"post","link":"https:\/\/www.wkiri.com\/today\/?p=35","title":{"rendered":"CVS goodies"},"content":{"rendered":"<p>I use CVS (Concurrent Versioning System; <a href=\"http:\/\/en.wikipedia.org\/wiki\/Concurrent_Versions_System\">CVS in wikipedia<\/a>) regularly to track software, user&#8217;s guides, and technical papers that I write.  The ability to track different versions, and roll back when absolutely necessary, is a wonderful safety net to have.  When collaborating with others, the fact that we can all be working on our own copies at the same time is a productivity boon.  I also like being able to  review log messages covering a given file&#8217;s evolutionary history.  (And no, I am not going to discuss the merits of CVS versus SVN (Subversion); there&#8217;s plenty of that all over the net for you to enjoy.)<\/p>\n<p>Today, thanks to a co-worker&#8217;s presentation and some ensuing research, I learned some new CVS tricks that promise to make it an even more useful tool for me:<\/p>\n<blockquote>\n<dl>\n<dt><tt>cvs admin -m rev:msg<\/tt><\/p>\n<dd>Update the log message for revision &#8220;rev&#8221; to be &#8220;msg&#8221;.  While some might wince at the potential for revisionist (*snerk*) activity, this will be oh-so-handy for fixing those typos you notice only after hitting enter on your <tt>cvs commit -m \"My messge goes hre\"<\/tt>.<\/p>\n<dt><tt>cvs checkout -D \"1 hour ago\"<\/tt><\/p>\n<dd>(Or, ye gads, -D &#8220;1 week ago&#8221;, depending on the level of panic you&#8217;re experiencing with oh-my-god-it&#8217;s-BROKEN!)  Check out the version of each file that was current as of the specified date.  You can use absolute dates, too, but the relative thing is pretty darn cool!<\/p>\n<dt><tt>cvs tag -D \"6\/5\/07\" tag last_known_good<\/tt><\/p>\n<dd>Tag all files as of the specified date (relative dates good here, too!) with the &#8220;last_known_good&#8221; tag.  Ultra-useful if you need to go back in time and tag a release that you meant to tag before you went and modified a bunch of files.<\/p>\n<dt><tt>cvs annotate filename<\/tt><\/p>\n<dd>Annotate each line of &#8220;filename&#8221; with the last revision in which it was modified.  Also shows who was the modifier.  Fun pipeline: <br \/>\n<tt>cvs annotate filename | cut -f2 -d'(' | cut -f1 -d' ' | sort | uniq -c<\/tt><br \/>\n  This will show a count next to each author indicating how many of the &#8220;most recent changes&#8221; they are responsible for.<\/p>\n<dt><tt>cvs watch add filename<\/tt><\/p>\n<dd>Receive email whenever &#8220;filename&#8221; is modified by someone.  Note: <tt>cvs watch on filename<\/tt> is quite different; it turns on read-only checkouts of &#8220;filename&#8221;.  Developers would then need to issue <tt>cvs edit filename<\/tt> to get a writeable version of &#8220;filename&#8221;, which alerts others to their actions.  Also, they then are listed when <tt>cvs editors filename<\/tt> is issued.\n<\/dl>\n<\/blockquote>\n<p>What are your favorite CVS commands?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use CVS (Concurrent Versioning System; CVS in wikipedia) regularly to track software, user&#8217;s guides, and technical papers that I write. The ability to track different versions, and roll back when absolutely necessary, is a wonderful safety net to have. When collaborating with others, the fact that we can all be working on our own [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[13,2],"tags":[],"_links":{"self":[{"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=\/wp\/v2\/posts\/35"}],"collection":[{"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35"}],"version-history":[{"count":0,"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=\/wp\/v2\/posts\/35\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wkiri.com\/today\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}