summaryrefslogtreecommitdiff
path: root/IkiWiki/Rcs
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-22 14:28:38 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-11-22 14:28:38 +0000
commit04a9dbfe7daa9c352ae4e9af17df8134248f3806 (patch)
tree253d6c60f0ebcdc7198ea9e67767400de711755d /IkiWiki/Rcs
parent00c6f9e5cbed1ed0943d93aacdf63ce696133ca6 (diff)
updates
Diffstat (limited to 'IkiWiki/Rcs')
-rw-r--r--IkiWiki/Rcs/Stub.pm2
-rw-r--r--IkiWiki/Rcs/git.pm11
-rw-r--r--IkiWiki/Rcs/mercurial.pm9
-rw-r--r--IkiWiki/Rcs/svn.pm11
-rw-r--r--IkiWiki/Rcs/tla.pm11
5 files changed, 38 insertions, 6 deletions
diff --git a/IkiWiki/Rcs/Stub.pm b/IkiWiki/Rcs/Stub.pm
index e408d5ac3..087f2508c 100644
--- a/IkiWiki/Rcs/Stub.pm
+++ b/IkiWiki/Rcs/Stub.pm
@@ -20,7 +20,7 @@ sub rcs_prepedit ($) {
return ""
}
-sub rcs_commit ($$$) {
+sub rcs_commit ($$$;$$) {
# Tries to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on failure.
# The file is relative to the srcdir.
diff --git a/IkiWiki/Rcs/git.pm b/IkiWiki/Rcs/git.pm
index 46adf1657..05eaa8d78 100644
--- a/IkiWiki/Rcs/git.pm
+++ b/IkiWiki/Rcs/git.pm
@@ -294,12 +294,19 @@ sub rcs_prepedit ($) { #{{{
return git_sha1($file);
} #}}}
-sub rcs_commit ($$$) { #{{{
+sub rcs_commit ($$$;$$) { #{{{
# Try to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on
# failure.
- my ($file, $message, $rcstoken) = @_;
+ my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+
+ if (defined $user) {
+ $message="web commit by $user".(length $message ? ": $message" : "");
+ }
+ elsif (defined $ipaddr) {
+ $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+ }
# XXX: Wiki directory is in the unlocked state when starting this
# action. But it takes time for a Git process to finish its job
diff --git a/IkiWiki/Rcs/mercurial.pm b/IkiWiki/Rcs/mercurial.pm
index 36972c560..66ff0996a 100644
--- a/IkiWiki/Rcs/mercurial.pm
+++ b/IkiWiki/Rcs/mercurial.pm
@@ -66,7 +66,14 @@ sub rcs_prepedit ($) { #{{{
} #}}}
sub rcs_commit ($$$) { #{{{
- my ($file, $message, $rcstoken) = @_;
+ my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+
+ if (defined $user) {
+ $message="web commit by $user".(length $message ? ": $message" : "");
+ }
+ elsif (defined $ipaddr) {
+ $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+ }
$message = possibly_foolish_untaint($message);
diff --git a/IkiWiki/Rcs/svn.pm b/IkiWiki/Rcs/svn.pm
index fbf6b2c9e..597295d44 100644
--- a/IkiWiki/Rcs/svn.pm
+++ b/IkiWiki/Rcs/svn.pm
@@ -60,13 +60,22 @@ sub rcs_prepedit ($) { #{{{
}
} #}}}
-sub rcs_commit ($$$) { #{{{
+sub rcs_commit ($$$;$$) { #{{{
# Tries to commit the page; returns undef on _success_ and
# a version of the page with the rcs's conflict markers on failure.
# The file is relative to the srcdir.
my $file=shift;
my $message=shift;
my $rcstoken=shift;
+ my $user=shift;
+ my $ipaddr=shift;
+
+ if (defined $user) {
+ $message="web commit by $user".(length $message ? ": $message" : "");
+ }
+ elsif (defined $ipaddr) {
+ $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+ }
if (-d "$config{srcdir}/.svn") {
# Check to see if the page has been changed by someone
diff --git a/IkiWiki/Rcs/tla.pm b/IkiWiki/Rcs/tla.pm
index be5ec0601..7254eb1a7 100644
--- a/IkiWiki/Rcs/tla.pm
+++ b/IkiWiki/Rcs/tla.pm
@@ -38,10 +38,19 @@ sub rcs_prepedit ($) { #{{{
}
} #}}}
-sub rcs_commit ($$$) { #{{{
+sub rcs_commit ($$$;$$) { #{{{
my $file=shift;
my $message=shift;
my $rcstoken=shift;
+ my $user=shift;
+ my $ipaddr=shift;
+
+ if (defined $user) {
+ $message="web commit by $user".(length $message ? ": $message" : "");
+ }
+ elsif (defined $ipaddr) {
+ $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+ }
if (-d "$config{srcdir}/{arch}") {
# Check to see if the page has been changed by someone