]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* Numerous tla fixes from Clint.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 16 Sep 2006 04:09:06 +0000 (04:09 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sat, 16 Sep 2006 04:09:06 +0000 (04:09 +0000)
IkiWiki.pm
IkiWiki/Rcs/tla.pm
IkiWiki/Wrapper.pm
debian/changelog

index 174d2413bb93e6fc8b203def020f35f59dd61cb2..1a00f2dbd303894639cd52f3597f3cf2775f0e06 100644 (file)
@@ -25,7 +25,7 @@ memoize("pagespec_translate");
 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,
index 7ce635c64028f95ddae34bdc23214fd9aced1a2b..61f49cc1b1665f5f071ba22bf3b1b57cf5d79a2b 100644 (file)
@@ -13,6 +13,7 @@ sub quiet_system (@) {
        # See Debian bug #385939.
        open (SAVEOUT, ">&STDOUT");
        close STDOUT;
+       open (STDOUT, ">/dev/null");
        my $ret=system(@_);
        open (STDOUT, ">&SAVEOUT");
        close SAVEOUT;
@@ -51,8 +52,8 @@ sub rcs_commit ($$$) { #{{{
                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");
                        }
                }
@@ -105,7 +106,7 @@ sub rcs_recentchanges ($) {
                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");
@@ -122,7 +123,6 @@ sub rcs_recentchanges ($) {
 
                my @message;
                push @message, { line => escapeHTML($summ) };
-               $user = escapeHTML($user);
 
                my @pages;
 
@@ -151,8 +151,8 @@ sub rcs_recentchanges ($) {
 
 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}));
 
@@ -167,7 +167,7 @@ sub rcs_notify () { #{{{
        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/) {
index 0f64a59f4c039ab24872457cc3529c364deee172..4a98af622cad0d68819fa059f7cc2c7a1d996bf4 100644 (file)
@@ -46,6 +46,12 @@ EOF
                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']);
index 347819863818a085be9096e547411fd623f8a777..f9d63df9127bc93aaab3218b2272dd768dafb82a 100644 (file)
@@ -43,6 +43,7 @@ ikiwiki (1.27) UNRELEASED; urgency=low
     the original markdown or the one in Debian.
   * Version the libcgi-session-perl dependency, some features that need
     the new version are used in some cases (sslcookie).
+  * Numerous tla fixes from Clint.
 
  -- Joey Hess <joeyh@debian.org>  Fri, 15 Sep 2006 22:28:31 -0400