chiark / gitweb /
srcdump_vcsscript: make into a single hash, not a bevy of separate settings
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Mar 2013 19:44:05 +0000 (19:44 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Mar 2013 19:44:05 +0000 (19:44 +0000)
cgi-auth-flexible.pm

index 01d7df3..4b4823a 100644 (file)
@@ -282,8 +282,9 @@ sub srcdump_novcs ($$$$$) {
 sub srcdump_byvcs ($$$$$$) {
     my ($c, $v, $dumpdir, $dir, $outfn, $vcs) = @_;
 #print STDERR "BYVCS GIT $dir\n";
-    return srcdump_dir_cpio($c,$v,$dumpdir,$dir,$outfn,$vcs,
-                           $v->{S}{"srcdump_vcsscript_$vcs"});
+    my $script = $v->{S}{"srcdump_vcsscript"}{$vcs};
+    die "no script for vcs $vcs" unless defined $script;
+    return srcdump_dir_cpio($c,$v,$dumpdir,$dir,$outfn,$vcs,$script);
 }
 
 sub srcdump_file ($$$$) {
@@ -478,14 +479,11 @@ sub new_verifier {
            },
            srcdump_process_item => \&srcdump_process_item,
            srcdump_vcs_dirs => [qw(.git .hg .bzr .svn)],
-           srcdump_vcsscript_git => "
+           srcdump_vcsscript => [git => "
                  git ls-files -z
                  git ls-files -z --others --exclude-from=.gitignore
                  find .git -print0
-                            ",
-           srcdump_vcsscript_hg => "false hg",
-           srcdump_vcsscript_bzr => "false bzr",
-           srcdump_vcsscript_svn => "false svn",
+                            "],
            srcdump_byvcs => \&srcdump_byvcs,
            srcdump_novcs => \&srcdump_novcs,
            srcdump_excludes => [qw(*~ *.bak *.tmp), '#*#'],