{"id":1759,"date":"2008-02-17T13:24:06","date_gmt":"2008-02-17T17:24:06","guid":{"rendered":"http:\/\/www.hoogervorst.ca\/arthur\/?p=1759"},"modified":"2008-02-27T22:02:07","modified_gmt":"2008-02-28T02:02:07","slug":"cvs-meet-enscript","status":"publish","type":"post","link":"http:\/\/www.hoogervorst.ca\/arthur\/?p=1759","title":{"rendered":"CVS meet Enscript"},"content":{"rendered":"<p><span class=\"dropcap\">L<\/span>ast night, <a href='http:\/\/www.hoogervorst.ca\/arthur\/?attachment_id=1760' rel='attachment wp-att-1760' title='This sucks. Terribly'><img class=\"alignright\" src='http:\/\/www.hoogervorst.ca\/arthur\/wp-content\/uploads\/2008\/02\/thi-s_su_cks.thumbnail.jpg' alt='This sucks. Terribly' \/><\/a>I was installing CVS on my Debian box. Actually, it was already installed: the CVSROOT was ready to go and the service itself had been listening since the early days. However, I never finished assigning rights to myself, so, with that done and by adding myself to the cvs group, I was finally able to check in my latest Helios sources using WinCVS (I despise TortoiseCVS<sup>1<\/sup>).\n<\/p>\n<p>For work, I had once added <a href=\"http:\/\/www.viewvc.org\/\">viewcvs<\/a> to the CVS repository engine: Viewcvs allows developers to view the repository via a webserver. Easy as is: During its install (apt-get install viewcvs), I ran into the normal installation checks and changes for this specific script: Most of them can be resolved by Debian&#8217;s viewcvs installer but (as usual) you should prepare yourself for some old-handy typework. The first action on your list is to add a couple of Aliases to Apache&#8217;s httpd.conf file (in my case I was only interested in one, the viewcvs &#8216;docroot&#8217; parameter: I don&#8217;t like graphics<sup>2<\/sup>).\n<\/p>\n<p><pre>\r\n Alias \/viewcvs\/ \/usr\/share\/viewcvs\/\r\n<\/pre>\n<\/p>\n<p>The next step is to set the &#8216;docroot&#8217; and &#8216;icons&#8217; folder parameters in the viewcvs.conf file (\/etc\/viewcvs\/): these folders refer to the <em>folderstructure on the webserver<\/em> and not to the physical folder structure on your Linux system (hint: check Alias). After this, you can set the use_cvsgraph and use_enscript variables in that same file to 1.\n<\/p>\n<p>Enscript is a &#8216;source code highlighter&#8217;, but (obviously) it doesn&#8217;t come with a state file for C#: I found a good <a href=\"http:\/\/www.adammil.net\/code.html\">one<\/a> at Adam Milazzo&#8217;s (Thanks Adam). This file should be copied to the enscript states directory (on Debian that is at \/usr\/share\/enscript\/hl). Also, you will have to make a couple of changes to the enscript.st file (which is in the same directory): add the csharp highlighter to the namerules section. The final step that needs to be undertaken is a change to the viewcvs.py file (you generally should be able to find this at or around \/usr\/lib\/python2.3\/site-packages\/viewcvs\/). Look for the enscript_extensions section. Notice the comment that one of the programmer left behind, just right above that extensions section:\n<\/p>\n<p class=\"quote\">### this sucks&#8230; we have to duplicate the extensions defined by enscript\n<\/p>\n<p>You wouldn&#8217;t say.\n<\/p>\n<div class=\"reference\">\n<p><sup>1<\/sup> Yeah, I was going to write something here, but I forget. Oh right, something about TortoiseCVS and how I hate it.<br \/>\n<sup>2<\/sup> Uh. Right. What was that again?\n<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Last night, I was installing CVS on my Debian box. Actually, it was already installed: the CVSROOT was ready to go and the service itself had been listening since the early days. However, I never finished assigning rights to myself, &hellip; <a href=\"http:\/\/www.hoogervorst.ca\/arthur\/?p=1759\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,4],"tags":[88,169,170,176],"_links":{"self":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1759"}],"collection":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1759"}],"version-history":[{"count":0,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=\/wp\/v2\/posts\/1759\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1759"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hoogervorst.ca\/arthur\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}