From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/36715 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Version control tags in context (was Logos in context / Miscellaneous questions) Date: Thu, 20 Sep 2007 19:15:49 -0400 (EDT) Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1190330187 2444 80.91.229.12 (20 Sep 2007 23:16:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Sep 2007 23:16:27 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Sep 21 01:16:25 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IYVFw-0005kZ-S1 for gctc-ntg-context-518@m.gmane.org; Fri, 21 Sep 2007 01:16:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B9396202B7; Fri, 21 Sep 2007 01:16:22 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 32312-04; Fri, 21 Sep 2007 01:16:14 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AB3EE202B3; Fri, 21 Sep 2007 01:16:13 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B038B202B3 for ; Fri, 21 Sep 2007 01:16:08 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31647-03 for ; Fri, 21 Sep 2007 01:15:56 +0200 (CEST) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by ronja.ntg.nl (Postfix) with ESMTP id 51D6720280 for ; Fri, 21 Sep 2007 01:15:53 +0200 (CEST) Original-Received: FROM aditya.annarb01.mi.comcast.net (adsl-68-79-103-226.dsl.sfldmi.ameritech.net [68.79.103.226]) BY tombraider.mr.itd.umich.edu ID 46F2FF26.9657D.5515 ; 20 Sep 2007 19:15:51 -0400 In-Reply-To: X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:36715 Archived-At: On Tue, 18 Sep 2007, Edd Barrett wrote: > Hi, > > On 17/09/2007, Aditya Mahajan wrote: >> On Mon, 17 Sep 2007, Edd Barrett wrote: >>> >>> B) Is there an equivilent to the RCS package for latex. Basically it >>> parses version control tags from CVS/RCS. >> >> There are a couple of RCS packages for LaTeX. Can you elaborate on >> what functionality you need. Most of it is pretty straightforward to >> port to ConTeXt. > > I used to use it to insert tags without all the crud around it. So for > example a revision id directly from CVS looks like this "$Revision: > 1.4$" (no quotes) and I used to use \RCSRevision which would expand to > just "1.4". It's probably quote simple, but would require research (I > have but merely scratched the surface of TeX/Context). Here is a very preliminary version. \def\defineVERSION {\dosingleargument\dodefineVERSION} \def\dodefineVERSION[#1]% {\dododefineVERSION#1} \def\dododefineVERSION$#1: #2$% {\setvalue{VERSION:#1}{#2}} \def\getVERSION#1{\getvalue{VERSION:#1}} \defineVERSION[$Revision: 1.4$] \defineVERSION [$File: something$] \starttext This file, \getVERSION{File}, is at version \getVERSION{Revision} \stoptext I changed the interface to make it more ConTeXtish. AFAIU version control, this should work with RCS, CVS, and subversion. It is not too hard to extend this to $Data:$ and $Id:$. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________