[tex-live] svn update killed
Reinhard Kotucha
reinhard.kotucha at web.de
Wed Apr 19 03:58:48 CEST 2006
>>>>> "Staszek" == Staszek Wawrykiewicz <staw at gust.org.pl> writes:
> ... but svn update is working now, however so slowly :-)
sed -e 's/:-\)/:-\(/g'
> Has svn any short commant to see what was lastly changed and in
> which directories in such huge repository as TL?
Maybe I can write a small Perl script which updates only the files
which had been changed at tug.org.
Karl, can you install the following script in svn's hook directory
under the name "post-commit"?
__________________________________________________________________
#!/bin/sh
REPOS="$1"
REV="$2"
LOGDIR=/some/dir/at/tug.org
LOGFILE=${LOGDIR}/texlive-log
TMPFILE=${LOGDIR}/texlive-tmp
echo "rev $REV" > ${TMPFILE}
svnlook changed ${REPOS} -r${REV} >> ${TMPFILE}
cat ${LOGFILE} >> ${TMPFILE}
mv ${TMPFILE} ${LOGFILE}
__________________________________________________________________
I just installed a sandbox svn repository with old vntex stuff.
After I played a bit with it, ${LOGFILE} looked like this:
__________________________________________________________________
rev 94
D texmf-vnr/fonts/source/public/vnr/vnbx10.mf
rev 93
D texmf-vnr/fonts/source/public/vnr/vnbx8.mf
D texmf-vnr/fonts/source/public/vnr/vnbx9.mf
rev 92
D texmf-vnr/fonts/source/public/vnr/vnbx7.mf
__________________________________________________________________
A Perl script could first determine the current revision number on
the local system using
svn info -r HEAD
and then read ${LOGFILE} from tug.org using wget:
while (<WGET>) {
last if /^rev ${LOCAL_REV}$/; # abort if rev_server == rev_local
next if /^rev /; # ignore rev numbers
s/.{4}//; # delete everything before path
system "svn update $_"; # run svn update
}
Note that I don't have a trunk directory in the vntex repository.
Maybe it's better to pipe the output of svnlook through
sed -e 's|trunk/|./|' or similar because the trunk directory does not
appear after you have checked out texlive.
I also considered to use "dirs-changed" instead of "changed" as an
svnlook option. It looks more efficient at a first glance but
is quite inefficient if a file has to be updated which resides close
to the root directory.
I tried "svnlook dirs-changed" and modified the TODO file in the root
directory. The result was:
__________________________________________________________________
rev 95
/
__________________________________________________________________
In this case the script will do the same as "svn update texlive".
Maybe it is a bit nasty that post-commit \emph{pre}pends new stuff to
$LOGFILE, but on the other hand, wget has to download only a few lines
each time. I suppose that the script will run reasonably fast.
Presumably the $LOGFILE will grow to a few megabytes each year but can
be removed each time TL is released. On the other hand, old stuff is
at the bottom and a cron job can truncate the file if it grows too
fast.
Regards,
Reinhard
--
----------------------------------------------------------------------------
Reinhard Kotucha Phone: +49-511-4592165
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 tex-live
mailing list