From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/38764 Path: news.gmane.org!not-for-mail From: Markus Bernhardt Newsgroups: gmane.comp.tex.context Subject: Re: Module for svn info Date: Tue, 22 Jan 2008 12:15:09 +0100 Message-ID: <4795D03D.9090109@scmb.de> 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: multipart/mixed; boundary="------------030507080801030906020301" X-Trace: ger.gmane.org 1201000738 18726 80.91.229.12 (22 Jan 2008 11:18:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Jan 2008 11:18:58 +0000 (UTC) To: mailing list for ConTeXt users , ernesto_schirmacher@hotmail.com Original-X-From: ntg-context-bounces@ntg.nl Tue Jan 22 12:19:13 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 1JHH9r-0005tm-6h for gctc-ntg-context-518@m.gmane.org; Tue, 22 Jan 2008 12:19:11 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A28731FBC6; Tue, 22 Jan 2008 12:17:19 +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 14839-03-4; Tue, 22 Jan 2008 12:16:29 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 10ABC1FB64; Tue, 22 Jan 2008 12:16:17 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id EC2951FB31 for ; Tue, 22 Jan 2008 12:15:43 +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 13137-05-3 for ; Tue, 22 Jan 2008 12:14:36 +0100 (CET) Original-Received: from fmx-1.softmethod.de (fmx-1.softmethod.de [195.248.71.4]) by ronja.ntg.nl (Postfix) with ESMTP id 8F8D71FB72 for ; Tue, 22 Jan 2008 12:14:27 +0100 (CET) Original-Received: from openexchange.scmb.de (gateway.softmethod.de [195.248.71.254]) by fmx-1.softmethod.de (Postfix) with ESMTP id 15A1F620E; Tue, 22 Jan 2008 12:14:23 +0100 (CET) Original-Received: from [194.123.101.79] (fdhcp-79.scmb.local [194.123.101.79]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by openexchange.scmb.de (Postfix) with ESMTP id E49B5CD0441; Tue, 22 Jan 2008 12:14:24 +0100 (CET) User-Agent: Thunderbird 2.0.0.6 (X11/20071022) In-Reply-To: X-Enigmail-Version: 0.95.0 OpenPGP: url=pgp.mit.edu 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:38764 Archived-At: This is a multi-part message in MIME format. --------------030507080801030906020301 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ernesto, hi Robin, thanks for your replies. The thing I like most with your solution is that svnversion provides a modify flag, so I can see whether all changes have been cheched in. Great= . A little drawback is that all files under the current path are used to determine the version. If theres a file in the path which is not part of the document changes to this file will also change the revision of the document. But I think this can be easily prevented by placing every document into an own directory. What do you think of using: \def\SVNVERSION{svnversion -n > svnversion.tex} \ifeof18 \installprogram{\SVNVERSION}% \else \executesystemcommand{\SVNVERSION}% \fi Kind regards, Markus Ernesto Schirmacher schrieb: >> 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. This is not true. The complete name of $Rev=A7$ is $LastChangedRevision$. It's the revision of the last change to this file. >> 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. There can be no useful global last revision number, because it always depends on the used URL. > 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 > _______________________________________________________________________= ____________ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHldA9dnooMonJSYkRAggwAJ9pNN8yoJR5rIvdahf4eJo0sTp5kQCfUqOR EVoOQluHh+9LhNRKTJDIFo8=3D =3Dil3n -----END PGP SIGNATURE----- --------------030507080801030906020301 Content-Type: text/x-vcard; charset=utf-8; name="Markus_Bernhardt.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="Markus_Bernhardt.vcf" begin:vcard fn:Markus Bernhardt n:Bernhardt;Markus org:Software Consulting Markus Bernhardt GmbH adr;quoted-printable:;;Spieljochstr. 34;M=C3=BCnchen;;81825;Germany email;internet:Markus.Bernhardt@scmb.de title;quoted-printable:Gesch=C3=A4ftsf=C3=BChrer tel;work:+49-89-420903-0 tel;fax:+49-89-420903-20 tel;home:+40-90-18932799 tel;cell:+49-171-5770462 note;quoted-printable:Gesch=C3=A4ftsf=C3=BChrung Markus Bernhardt=0D=0A= Handelsregister AG M=C3=BCnchen HRB 125966=0D=0A= USt-Id DE201885231 x-mozilla-html:FALSE url:www.scmb.de version:2.1 end:vcard --------------030507080801030906020301 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --------------030507080801030906020301--