From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38757 Path: news.gmane.org!not-for-mail From: Ernesto Schirmacher Newsgroups: gmane.comp.tex.context Subject: Re: Module for svn info Date: Mon, 21 Jan 2008 22:10:06 -0500 Message-ID: References: <4D2077CD-619C-4429-A1D7-733931A9FB5C@csiro.au> 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: ger.gmane.org 1200971528 701 80.91.229.12 (22 Jan 2008 03:12:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2008 03:12:08 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 22 04:12:26 2008 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 1JH9Yn-00030c-Dt for gctc-ntg-context-518@m.gmane.org; Tue, 22 Jan 2008 04:12:25 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 20B651FB8E; Tue, 22 Jan 2008 04:11:59 +0100 (CET) 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 17453-01-9; Tue, 22 Jan 2008 04:11:19 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AA02C1FB3C; Tue, 22 Jan 2008 04:11:19 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C6C061FB3C for ; Tue, 22 Jan 2008 04:11:17 +0100 (CET) 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 17453-01-8 for ; Tue, 22 Jan 2008 04:10:40 +0100 (CET) Original-Received: from bay0-omc3-s28.bay0.hotmail.com (bay0-omc3-s28.bay0.hotmail.com [65.54.246.228]) by ronja.ntg.nl (Postfix) with ESMTP id 8C4501FB39 for ; Tue, 22 Jan 2008 04:10:22 +0100 (CET) Original-Received: from BAY128-W13 ([65.55.133.48]) by bay0-omc3-s28.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 21 Jan 2008 19:10:06 -0800 X-Originating-IP: [24.218.60.171] Importance: Normal In-Reply-To: <4D2077CD-619C-4429-A1D7-733931A9FB5C@csiro.au> X-OriginalArrivalTime: 22 Jan 2008 03:10:06.0976 (UTC) FILETIME=[4A39E800:01C85CA4] 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:38757 Archived-At: > If your sources are in svn, then they actually have the same svn- > number, after a commit. But the numbers in the $Revision$ or $Id$ tags > of your working copies are not updated by svn commit. However, if you > do an "svn update" after the commit, it should update the numbers. So, > you shouldn't need to work out the maximum value. The svn keyword Revision or Rev or LastChangedRevision (they are all the same) are defined as the last revision where the file changed (see subversion book chapter 3 section keyword substitution). It seems to me that subversion does not have a global keyword that would give you the last revision number. But they do provide svnversion to get that number automatically (see subversion book highlighted box named "Where's $GlobalRev$?"). So Robin's solution below seems to be the best way to get the global version number. > > svnversion> svnversion.tex ; texexec document.tex > > in the Makefile, and on the document front page somewhere > > \doiffileelse{svnversion.tex}{ > Subversion revision > \ignorespaces \input svnversion\relax \removeunwantedspaces . > \crlf > }{} ___________________________________________________________________________________ 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 ___________________________________________________________________________________