]> sipb.mit.edu Git - ikiwiki.git/commitdiff
add guard against enabling multiple rcs plugins
authorJoey Hess <joey@kodama.kitenet.net>
Wed, 30 Jul 2008 18:32:48 +0000 (14:32 -0400)
committerJoey Hess <joey@kodama.kitenet.net>
Wed, 30 Jul 2008 18:32:48 +0000 (14:32 -0400)
IkiWiki/Plugin/bzr.pm
IkiWiki/Plugin/git.pm
IkiWiki/Plugin/mercurial.pm
IkiWiki/Plugin/monotone.pm
IkiWiki/Plugin/svn.pm
IkiWiki/Plugin/tla.pm

index 99025a973db235605cf64448e9ccdd04e1fc687b..e7b22f3c5c5ffb24e8c1379b4dc4399cfaf2e6f8 100644 (file)
@@ -8,6 +8,9 @@ use Encode;
 use open qw{:utf8 :std};
 
 sub import { #{{{
+       if (exists $IkiWiki::hooks{rcs}) {
+               error(gettext("cannot use multiple rcs plugins"));
+       }
        hook(type => "checkconfig", id => "bzr", call => \&checkconfig);
        hook(type => "getsetup", id => "bzr", call => \&getsetup);
        hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
index 5e302729ea1c26c80c93d4974e94e8a57e444012..6f0ac56d5c3b13204c92d0dda1c0dbac417d07d4 100644 (file)
@@ -11,6 +11,9 @@ my $sha1_pattern     = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums
 my $dummy_commit_msg = 'dummy commit';      # message to skip in recent changes
 
 sub import { #{{{
+       if (exists $IkiWiki::hooks{rcs}) {
+               error(gettext("cannot use multiple rcs plugins"));
+       }
        hook(type => "checkconfig", id => "git", call => \&checkconfig);
        hook(type => "getsetup", id => "git", call => \&getsetup);
        hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
index d2c34fa6a5810c43ac999fb23184a08dab1abc76..b05c954dc5565433add20738f8020bd83fe4b8f9 100644 (file)
@@ -8,6 +8,9 @@ use Encode;
 use open qw{:utf8 :std};
 
 sub import { #{{{
+       if (exists $IkiWiki::hooks{rcs}) {
+               error(gettext("cannot use multiple rcs plugins"));
+       }
        hook(type => "checkconfig", id => "mercurial", call => \&checkconfig);
        hook(type => "getsetup", id => "mercurial", call => \&getsetup);
        hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
index 4b9be316a4e602f5aaa075c8c62f2e8ade8e3ed2..a591ecec56e3f099e6bf2cff5bc4a565f753a71f 100644 (file)
@@ -11,6 +11,9 @@ use Date::Format qw(time2str);
 my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate sha1sums
 
 sub import { #{{{
+       if (exists $IkiWiki::hooks{rcs}) {
+               error(gettext("cannot use multiple rcs plugins"));
+       }
        hook(type => "checkconfig", id => "monotone", call => \&checkconfig);
        hook(type => "getsetup", id => "monotone", call => \&getsetup);
        hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
index 51683704c5928d6e5577a3e1f92b62adbb41849f..262fca99a781e01a49eb35d440c86c648c77c5ed 100644 (file)
@@ -7,6 +7,9 @@ use IkiWiki;
 use POSIX qw(setlocale LC_CTYPE);
 
 sub import { #{{{
+       if (exists $IkiWiki::hooks{rcs}) {
+               error(gettext("cannot use multiple rcs plugins"));
+       }
        hook(type => "checkconfig", id => "svn", call => \&checkconfig);
        hook(type => "getsetup", id => "svn", call => \&getsetup);
        hook(type => "rcs", id => "rcs_update", call => \&rcs_update);
index 6faaecccc5d7a48a1f44e3fd40aa6376c8d8cf48..fe596525970a0be23a1fa416cfb01c966018697c 100644 (file)
@@ -6,6 +6,9 @@ use strict;
 use IkiWiki;
 
 sub import { #{{{
+       if (exists $IkiWiki::hooks{rcs}) {
+               error(gettext("cannot use multiple rcs plugins"));
+       }
        hook(type => "checkconfig", id => "tla", call => \&checkconfig);
        hook(type => "getsetup", id => "tla", call => \&getsetup);
        hook(type => "rcs", id => "rcs_update", call => \&rcs_update);