ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Markus Bernhardt <Markus.Bernhardt@scmb.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	ernesto_schirmacher@hotmail.com
Subject: Re: Module for svn info
Date: Tue, 22 Jan 2008 12:15:09 +0100	[thread overview]
Message-ID: <4795D03D.9090109@scmb.de> (raw)
In-Reply-To: <BAY128-W13BB02DE8D11846122BD70973E0@phx.gbl>

[-- Attachment #1: Type: text/plain, Size: 2988 bytes --]

-----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§$ 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=
=il3n
-----END PGP SIGNATURE-----


[-- Attachment #2: Markus_Bernhardt.vcf --]
[-- Type: text/x-vcard, Size: 558 bytes --]

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


[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2008-01-22 11:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 23:58 Robin Kirkham
2008-01-22  3:10 ` Ernesto Schirmacher
2008-01-22 11:15   ` Markus Bernhardt [this message]
2008-01-23 12:34     ` Aditya Mahajan
     [not found] <mailman.3280.1201040714.4317.ntg-context@ntg.nl>
2008-01-23 11:52 ` Robin Kirkham
2008-01-23 21:26   ` Peter Münster
  -- strict thread matches above, loose matches on Subject: below --
2008-01-20  2:34 Markus Bernhardt
2008-01-20  5:11 ` Aditya Mahajan
2008-01-21  8:32   ` Markus Bernhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4795D03D.9090109@scmb.de \
    --to=markus.bernhardt@scmb.de \
    --cc=ernesto_schirmacher@hotmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).