From 47e9cdc1b9a82bee3aa22b28d9dda1ee98fea15a Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Mon, 7 Aug 2006 21:40:21 +0000 Subject: Take previous version from file itself rather than from svn log --- scripts/unfuzzy-xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/unfuzzy-xml b/scripts/unfuzzy-xml index bd324d26a..cd39cb1c2 100755 --- a/scripts/unfuzzy-xml +++ b/scripts/unfuzzy-xml @@ -7,7 +7,7 @@ # English text and then only if they know exactly what they are doing! # The script takes a revision number as argument, looks for English files -# modified in that commit and finds the previous revision from the log. +# modified in that commit and finds the previous revision of the file. # It then changes the revision comment for any translation that was # up-to-date with the previous revision. @@ -25,8 +25,8 @@ MODIFIED="$(find . -name "*.xml" | xargs grep "^<.*\$Id:.*$REV" | cut -d: -f1)" cd .. for XML in $MODIFIED; do - PREVREV="$(svn log en/$XML | egrep "^r[0-9]{5} \| .* \| [0-9]* lines?" | \ - head -n 2 | tail -n 1 | sed "s/^r\([0-9]*\).*$/\1/")" + PREVREV="$(svn cat -r $(($REV - 1)) en/$XML | grep "^<.*\$Id:" | \ + sed "s/^.*\.xml \([0-9]*\) .*/\1/")" echo "$XML: $PREVREV -> $REV" if [ "$PREVREV" ] && [ "$PREVREV" -lt "$REV" ]; then sed -i "s/^\(.*original version: \)$PREVREV\(.*\)$/\1$REV\2/" */$XML -- cgit v1.2.3