[Dev-luatex] svn revision ids

Reinhard Kotucha reinhard.kotucha at web.de
Sun Feb 21 22:04:37 CET 2010

On 21 February 2010 Taco Hoekwater wrote:

 > Taco Hoekwater wrote:
 > > 
 > > To make matters worse, 'svnversion' has a bad habit of returning
 > > something that is not a number at all, so it has to be parsed.
 > Now committed #3439. This is based on svnversion with a sed
 > command to strip unwanted info and a preceding 'svn up' to
 > make sure that svn agrees with itself.

There is one difference to the former script, though.  Because no
directory is specified, the revision number you get is the highest one
of the whole repository.  This means that it is increased also if you
don't change anything in the source tree but update trunk/manual.

If you prefer the highest revision number of any file in trunk/source
only, you could do something like:

svnversion -c ./source |
   sed -ne 's/^[0-9]*:*\([0-9]*\).*/#define luatex_svn_revision \1/p'

I currently get

#define luatex_svn_revision 3441

and I would get the same revision number even if something in the
manual tree was updated meanwhile.

A disadvantage is that svnversion's argument contains a relative path
which doesn't allow you to run build.sh from any other directory but
trunk.  But the file build.sh itself contains relative paths too,
therefore it won't work anyway.

An easy way to allow people to call, for instance,
./svn/trunk/build.sh or ../../../build.sh is this:

--- build.sh	2010-02-21 16:34:00.000000000 +0100
+++ build.sh-new	2010-02-21 20:47:24.000000000 +0100
@@ -19,6 +19,8 @@
+cd `dirname $0`
 # try to find gnu make; we may need it
 if make -v 2>&1| grep "GNU Make" >/dev/null

It's quite likely that it works on MSYS too, but it can't hurt to
test it there.

Martin, your assumption is almost right, I've 


for the same reason as Taco.  Another reason is that it's not very
useful to get error messages in German because I often have to post
them to international mailing lists.  I'm grateful that Khaled Hosny
doesn't post them in Arabic. :)


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the dev-luatex mailing list