aboutsummaryrefslogtreecommitdiffstats
path: root/german/vote
diff options
context:
space:
mode:
authorSteve McIntyre <93sam>2018-05-30 02:40:32 +0000
committerSteve McIntyre <93sam>2018-05-30 02:40:32 +0000
commit44a612deb8882a1e0807f0048d600a7fbf5db271 (patch)
tree1493c4cb7ca396d210c3f4eeb72774f6be8aff0a /german/vote
parentafdb29732ca24242f1a2e94f98e90034f9925f46 (diff)
Fix up more scripts to use Local::VCS
Rather than parsing CVS/Entries directly, use our portable infrastructure. romanian/whatsnew.pl looks obsolete, so disabled it CVS version numbers danish/security/copyadvisory.pl: 1.13 -> 1.14 french/security/dsa-translator.pl: 1.58 -> 1.59 german/security/copyadvisory.pl: 1.15 -> 1.16 german/vote/copyvote.pl: 1.24 -> 1.25 romanian/whatsnew.pl: 1.3 -> 1.4 russian/security/copyadvisory.pl: 1.3 -> 1.4 swedish/News/weekly/copyissue.pl: 1.24 -> 1.25 swedish/security/copyadvisory.pl: 1.101 -> 1.102
Diffstat (limited to 'german/vote')
-rwxr-xr-xgerman/vote/copyvote.pl39
1 files changed, 11 insertions, 28 deletions
diff --git a/german/vote/copyvote.pl b/german/vote/copyvote.pl
index f98f2517db5..5817d9ebfb0 100755
--- a/german/vote/copyvote.pl
+++ b/german/vote/copyvote.pl
@@ -14,6 +14,9 @@
use Date::Manip;
use Encode 'decode_utf8';
+use FindBin;
+use lib "$FindBin::Bin/../../Perl";
+use Local::VCS;
# Get command line
$number = $ARGV[0];
@@ -94,7 +97,6 @@ foreach $vf (@vfiles)
# Create needed file and directory names
$srcfile= "$srcdir/$vf";
-$cvsfile= "$srcdir/CVS/Entries";
$dstdir = "./$year";
$dstfile= "$dstdir/$vf";
@@ -103,43 +105,24 @@ die "File $srcfile does not exist\n" unless -e $srcfile;
die "File $dstfile already exists\n" if -e $dstfile;
mkdir $dstdir, 0755 unless -d $dstdir;
-# Open the files
-open CVS, $cvsfile
- or die "Could not read $cvsfile ($!)\n";
+my $VCS = Local::VCS->new();
+my %file_info = $VCS->file_info($srcfile);
+$revision = $file_info{'cmt_rev'};
+unless ($revision)
+{
+ die "Could not get revision number - bug in script?\n";
+}
+# Open the files
open SRC, $srcfile
or die "Could not read $srcfile ($!)\n";
open DST, ">$dstfile"
or die "Could not create $dstfile ($!)\n";
-# Retrieve the CVS version number
-$revision="";
-while (<CVS>)
-{
-#print "$_ :: $vf\n";
-#if (m[^/$number\.wml/([0-9]*\.[0-9]*)/]o)
- if (m(^/$vf/([0-9]*\.[0-9]*)/))
- {
- $revision = $1;
-# print "Found $revision\n";
- }
-}
-
-close CVS;
-
-unless ($revision)
-{
- print "Could not get revision number for $vf - bug in script?\n";
- $revision = '1.1';
-}
-
-
# Insert the revision number
print DST qq'#use wml::debian::acronyms\n';
print DST qq'#use wml::debian::translation-check translation="$revision"\n';
-print DST qq'# \$I'; # Too fool CVS
-print DST qq'd: $vf,v 1.1 $year/11/02 21:15:10 jseidel Exp \$\n';
print DST qq'# Translator: $TRANSLATOR <$EMAIL> $dheute\n\n';

© 2014-2024 Faster IT GmbH | imprint | privacy policy