X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/862ca19eb1aee87e4ac05e8a5a9b326dd32dfe5d..82f0facb620e59594aaf318c2eaf676c7788f1e6:/IkiWiki/Rcs/tla.pm diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm index 47579c15b..e1389a346 100644 --- a/IkiWiki/Rcs/tla.pm +++ b/IkiWiki/Rcs/tla.pm @@ -1,10 +1,54 @@ #!/usr/bin/perl +package IkiWiki; + use warnings; use strict; use IkiWiki; -package IkiWiki; +hook(type => "checkconfig", id => "tla", call => sub { #{{{ + if (! defined $config{diffurl}) { + $config{diffurl}=""; + } + if (length $config{tla_wrapper}) { + push @{$config{wrappers}}, { + wrapper => $config{tla_wrapper}, + wrappermode => (defined $config{tla_wrappermode} ? $config{tla_wrappermode} : "06755"), + }; + } +}); #}}} + +hook(type => "getsetup", id => "tla", call => sub { #{{{ + return + tla_wrapper => { + type => "string", + #example => "", # TODO example + description => "tla post-commit executable to generate", + safe => 0, # file + rebuild => 0, + }, + tla_wrappermode => { + type => "string", + example => '06755', + description => "mode for tla_wrapper (can safely be made suid)", + safe => 0, + rebuild => 0, + }, + historyurl => { + type => "string", + #example => "", # TODO example + description => "url to show file history ([[file]] substituted)", + safe => 1, + rebuild => 1, + }, + diffurl => { + type => "string", + #example => "", # TODO example + description => "url to show a diff ([[file]] and [[rev]] substituted)", + safe => 1, + rebuild => 1, + }, +}); #}}} sub quiet_system (@) { # See Debian bug #385939. @@ -78,6 +122,14 @@ sub rcs_commit ($$$;$$) { #{{{ return undef # success } #}}} +sub rcs_commit_staged ($$$) { + # Commits all staged changes. Changes can be staged using rcs_add, + # rcs_remove, and rcs_rename. + my ($message, $user, $ipaddr)=@_; + + error("rcs_commit_staged not implemented for tla"); # TODO +} + sub rcs_add ($) { #{{{ my $file=shift; @@ -88,6 +140,18 @@ sub rcs_add ($) { #{{{ } } #}}} +sub rcs_remove ($) { # {{{ + my $file = shift; + + error("rcs_remove not implemented for tla"); # TODO +} #}}} + +sub rcs_rename ($$) { # {{{a + my ($src, $dest) = @_; + + error("rcs_rename not implemented for tla"); # TODO +} #}}} + sub rcs_recentchanges ($) { my $num=shift; my @ret;