my $installdir=''; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE
sub defaultconfig () { #{{{
- wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$)},
+ wiki_file_prune_regexp => qr{((^|/).svn/|\.\.|^\.|\/\.|\.x?html?$|\.rss$|.arch-ids/|{arch}/)},
wiki_link_regexp => qr/\[\[(?:([^\]\|]+)\|)?([^\s\]]+)\]\]/,
wiki_file_regexp => qr/(^[-[:alnum:]_.:\/+]+$)/,
verbose => 0,
# See Debian bug #385939.
open (SAVEOUT, ">&STDOUT");
close STDOUT;
+ open (STDOUT, ">/dev/null");
my $ret=system(@_);
open (STDOUT, ">&SAVEOUT");
close SAVEOUT;
if (defined $rev && defined $oldrev && $rev ne $oldrev) {
# Merge their changes into the file that we've
# changed.
- if (system("tla", "update", "-d",
- "$config{srcdir}/$file") != 0) {
+ if (quiet_system("tla", "update", "-d",
+ "$config{srcdir}") != 0) {
warn("tla update failed\n");
}
}
my $modfiles = $head->get("Modified-files");
my $user = $head->get("Creator");
- my @paths = grep {!/^.*\/\.arch-ids\/.*\.id$/} split(/ /,
+ my @paths = grep {!/^(.*\/\)?.arch-ids\/.*\.id$/} split(/ /,
"$newfiles $modfiles");
my $sdate = $head->get("Standard-date");
my @message;
push @message, { line => escapeHTML($summ) };
- $user = escapeHTML($user);
my @pages;
sub rcs_notify () { #{{{
# FIXME: Not set
- if (! exists $ENV{REV}) {
- error("REV is not set, not running from tla post-commit hook, cannot send notifications");
+ if (! exists $ENV{ARCH_VERSION}) {
+ error("ARCH_VERSION is not set, not running from tla post-commit hook, cannot send notifications");
}
my $rev=int(possibly_foolish_untaint($ENV{REV}));
my $newfiles = $head->get("New-files");
my $modfiles = $head->get("Modified-files");
- my @changed_pages = grep {!/^.*\/\.arch-ids\/.*\.id$/} split(/ /,
+ my @changed_pages = grep {!/(^.*\/)?\.arch-ids\/.*\.id$/} split(/ /,
"$newfiles $modfiles");
if ($message =~ /$tla_webcommit/) {
asprintf(&newenviron[i++], "%s=%s", "REV", s);
EOF
}
+ if ($config{rcs} eq "tla" && $config{notify}) {
+ $envsave.=<<"EOF"
+ if ((s=getenv("ARCH_VERSION")))
+ asprintf(&newenviron[i++], "%s=%s", "ARCH_VERSION", s);
+EOF
+ }
$Data::Dumper::Indent=0; # no newlines
my $configstring=Data::Dumper->Dump([\%config], ['*config']);