Hi, As of revision 3436, luatex once again reports a svn revision id in the banner when it has been built on a system with a working 'svn' command. The script that fetches the number is based on an idea of Reinhard Kotucha, and uses 'svn info URL' to get the number. The script is source/texk/web2c/luatexdir/getluatexsvnrevision.sh, and it is currently run from build.sh and from the tools/luatextag script. The latter is used to create the source tarballs. I am curious how it works out for other people, as it is quite possible that I made a thinking error yet again. Best wishes, Taco
2010/2/21 Taco Hoekwater
[taco@ntg tmp]$ echo $LANG en_US.UTF-8
what's wrong?
You are in the Netherlands and speak Dutch. Why doesn't your computer? :-)
echo $LANG de_DE.UTF-8 svn info http://foundry.supelec.fr/svn/luatex/trunk/source Pfad: source URL: http://foundry.supelec.fr/svn/luatex/trunk/source Basis des Projektarchivs: http://foundry.supelec.fr/svn/luatex UUID des Projektarchivs: 0b2b3880-5936-4365-a048-eb17d2e5a6bf Revision: 3436 Knotentyp: Verzeichnis Letzter Autor: taco Letzte geänderte Rev: 3436 Letztes Änderungsdatum: 2010-02-21 16:34:00 +0100 (So, 21. Feb 2010)
Martin Schröder wrote:
2010/2/21 Taco Hoekwater
: [taco@ntg tmp]$ echo $LANG en_US.UTF-8
what's wrong?
You are in the Netherlands and speak Dutch. Why doesn't your computer? :-)
While at the computer, I 'speak' English a lot more than Dutch. Thanks for the patch. Best wishes, Taco
On Sun, Feb 21, 2010 at 05:11:36PM +0100, Martin Schröder wrote:
2010/2/21 Taco Hoekwater
: [taco@ntg tmp]$ echo $LANG en_US.UTF-8
what's wrong?
You are in the Netherlands and speak Dutch. Why doesn't your computer? :-)
Though I and my computer speak Arabic, I usually set LC_ALL=en_US.UTF-8 in my ~/.bashrc to avoid such surprises. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
2010/2/21 Taco Hoekwater
The script is source/texk/web2c/luatexdir/getluatexsvnrevision.sh, and it is currently run from build.sh and from the tools/luatextag script. The latter is used to create the source tarballs.
This uses svn info with an URL, which is SLOW. Wouldn't svnversion be the better tool to use? Best Martin
Martin Schröder wrote:
2010/2/21 Taco Hoekwater
: The script is source/texk/web2c/luatexdir/getluatexsvnrevision.sh, and it is currently run from build.sh and from the tools/luatextag script. The latter is used to create the source tarballs.
This uses svn info with an URL, which is SLOW. Wouldn't svnversion be the better tool to use?
But that commmand only works if there is a local repository. Best wishes, Taco
Taco Hoekwater wrote:
Martin Schröder wrote:
2010/2/21 Taco Hoekwater
: The script is source/texk/web2c/luatexdir/getluatexsvnrevision.sh, and it is currently run from build.sh and from the tools/luatextag script. The latter is used to create the source tarballs.
This uses svn info with an URL, which is SLOW. Wouldn't svnversion be the better tool to use?
But that commmand only works if there is a local repository.
But it may be the only option, sigh. As Mojca just pointed out: svn info URL doesn't know whether the local revision even remotely matches the URL's current revision. 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. I remain convinced that this aspect of subversion is simply broken by design. Best wishes, Taco
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. Best wishes, Taco
On Sun, Feb 21, 2010 at 06:13:11PM +0100, 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.
And now I'm no longer able to build luatex: ../../../source/texk/web2c/luatexdir/luatex.c:22: error: expected expression before ‘;’ token ../../../source/texk/web2c/luatexdir/luatex.c: In function ‘runsystem’: ../../../source/texk/web2c/luatexdir/luatex.c:384: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result ../../../source/texk/web2c/luatexdir/luatex.c:386: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result make[5]: *** [luatex-luatex.o] Error 1 (I'm using git-svn to track the repository rather than svn directly) Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
Khaled Hosny wrote:
On Sun, Feb 21, 2010 at 06:13:11PM +0100, 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.
And now I'm no longer able to build luatex:
../../../source/texk/web2c/luatexdir/luatex.c:22: error: expected expression before ‘;’ token
This should have been fixed by #3440 (Patrick had the same problem) Best wishes, Taco
On Sun, Feb 21, 2010 at 07:52:29PM +0100, Taco Hoekwater wrote:
Khaled Hosny wrote:
On Sun, Feb 21, 2010 at 06:13:11PM +0100, 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.
And now I'm no longer able to build luatex:
../../../source/texk/web2c/luatexdir/luatex.c:22: error: expected expression before ‘;’ token
This should have been fixed by #3440 (Patrick had the same problem)
I'm still getting this error with #3441. -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
Hi,
../../../source/texk/web2c/luatexdir/luatex.c:22: error: expected expression before ‘;’ token
This should have been fixed by #3440 (Patrick had the same problem)
I'm still getting this error with #3441.
make sure you delete source/texk/web2c/luatexdir/luatex_svnversion.h. Patrick
On Sun, Feb 21, 2010 at 08:42:33PM +0100, Patrick Gundlach wrote:
Hi,
../../../source/texk/web2c/luatexdir/luatex.c:22: error: expected expression before ‘;’ token
This should have been fixed by #3440 (Patrick had the same problem)
I'm still getting this error with #3441.
make sure you delete source/texk/web2c/luatexdir/luatex_svnversion.h.
Building fine now (without svn revision though, but this is expected). Thanks. -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer
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 @@ export CONFIG_SHELL fi +cd `dirname $0` + # try to find gnu make; we may need it MAKE=make; 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 LANG=en_US.UTF-8 LC_COLLATE=C 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. :) Regards, Reinhard -- ---------------------------------------------------------------------------- Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:reinhard.kotucha@web.de ---------------------------------------------------------------------------- Microsoft isn't the answer. Microsoft is the question, and the answer is NO. ----------------------------------------------------------------------------
Reinhard Kotucha wrote:
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.
Right. I fixed this a little bit differently, though. getluatexsvnversion.sh now assumes it is run inside source/, so it has "svnversion -c .", and build.sh does (cd source; ./texk/web2c/luatexdir/getluatexsvnversion.sh ) I did it like this because I cannot test relative paths in build.sh myself (and those build.sh files have had those relative paths since day one, also in pdftex) Best wishes, Taco
One idea (though I have no idea if it's doable or not): maybe it's possible to create before-commit or after-commit hook that automatically changes some configuration file in repository after every commit and writes commit number to that file. Consequently the build should not depend on the existence of local svn repository. Mojca
Mojca Miklavec wrote:
One idea (though I have no idea if it's doable or not): maybe it's possible to create before-commit or after-commit hook that automatically changes some configuration file in repository after every commit and writes commit number to that file. Consequently the build should not depend on the existence of local svn repository.
I fear that there are two problems with that approach: 1. it meeds server-side scripting 2. each commit then has to be followed by an explicit svn co to fetch the newly updated file, otherwise the client does not know it has changed. Best wishes, Taco
Hi Taco,
I am curious how it works out for other people, as it is quite possible that I made a thinking error yet again.
$ git svn rebase [...] $ ./build.sh --parallel [...] ./source/texk/web2c/mplibdir -Dextra_version_info=`date +-%Y%m%d%H` -g -O2 -MT luatex-luatex.o -MD -MP -MF .deps/luatex-luatex.Tpo -c -o luatex-luatex.o `test -f 'luatexdir/luatex.c' || echo '../../../source/texk/web2c/'`luatexdir/luatex.c ../../../source/texk/web2c/luatexdir/luatex.c:22: error: ‘luatex_svn_revision’ undeclared here (not in a function) make[5]: *** [luatex-luatex.o] Error 1 make[4]: *** [all-recursive] Error 1 make[3]: *** [all] Error 2 make[2]: *** [subtexk] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1 strip: can't open file: build/texk/web2c/luatex (No such file or directory) ls: build/texk/web2c/luatex: No such file or directory Patrick http://www.luatex.de
participants (6)
-
Khaled Hosny
-
Martin Schröder
-
Mojca Miklavec
-
Patrick Gundlach
-
Reinhard Kotucha
-
Taco Hoekwater