summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/cvs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/cvs.pm')
-rw-r--r--IkiWiki/Plugin/cvs.pm23
1 files changed, 15 insertions, 8 deletions
diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm
index 8409bebed..2c2445f39 100644
--- a/IkiWiki/Plugin/cvs.pm
+++ b/IkiWiki/Plugin/cvs.pm
@@ -61,7 +61,7 @@ sub getsetup () {
cvs_wrapper => {
type => "string",
example => "/cvs/wikirepo/CVSROOT/post-commit",
- description => "cvs post-commit hook to generate (triggered by CVSROOT/loginfo entry",
+ description => "cvs post-commit hook to generate (triggered by CVSROOT/loginfo entry)",
safe => 0, # file
rebuild => 0,
},
@@ -221,11 +221,13 @@ sub rcs_add ($) {
if (defined($filemime) && $filemime eq 'text/plain') {
cvs_runcvs('add', $file) ||
warn("cvs add $file failed\n");
- } else {
+ }
+ else {
cvs_runcvs('add', '-kb', $file) ||
warn("cvs add binary $file failed\n");
}
- } else {
+ }
+ else {
# directory
cvs_runcvs('add', $file) ||
warn("cvs add $file failed\n");
@@ -339,7 +341,8 @@ sub rcs_recentchanges($) {
$message[0]->{line}=~/$config{web_commit_regexp}/) {
$user=defined $2 ? "$2" : "$3";
$message[0]->{line}=$4;
- } else {
+ }
+ else {
$committype="cvs";
}
@@ -349,21 +352,24 @@ sub rcs_recentchanges($) {
$line = <SPSVC>;
if ($line =~ /^Author: (.*)$/) {
$user = $1 unless defined $user && length $user;
- } else {
+ }
+ else {
error "expected Author, got $line";
}
$line = <SPSVC>;
if ($line =~ /^Date: (.*)$/) {
$when = str2time($1, 'UTC');
- } else {
+ }
+ else {
error "expected Date, got $line";
}
$line = <SPSVC>;
if ($line =~ /^PatchSet (.*)$/) {
$rev = $1;
- } else {
+ }
+ else {
error "expected PatchSet, got $line";
}
@@ -401,7 +407,8 @@ sub rcs_diff ($) {
if (wantarray) {
return @cvsps;
- } else {
+ }
+ else {
return join("", @cvsps);
}
}