diff options
author | Joey Hess <joey@kitenet.net> | 2010-06-23 16:05:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-06-23 16:05:49 -0400 |
commit | b4a43406f61b7ff9ab77d242edf4d59369ac8596 (patch) | |
tree | ca0d33b7d0e22a19f9fb1610df1f7238bcd2ec3d /IkiWiki/Plugin | |
parent | c46bcb425af0948ac59581d6ba7b477826d83ae3 (diff) | |
download | ikiwiki-b4a43406f61b7ff9ab77d242edf4d59369ac8596.tar ikiwiki-b4a43406f61b7ff9ab77d242edf4d59369ac8596.tar.gz |
API: rcs_commit and rcs_commit_staged are passed a new parameter
that may contain the username component of the email address of
the user making the commit.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/bzr.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/cvs.pm | 7 | ||||
-rw-r--r-- | IkiWiki/Plugin/darcs.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/git.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/mercurial.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/monotone.pm | 7 | ||||
-rw-r--r-- | IkiWiki/Plugin/norcs.pm | 8 | ||||
-rw-r--r-- | IkiWiki/Plugin/svn.pm | 7 | ||||
-rw-r--r-- | IkiWiki/Plugin/tla.pm | 7 |
9 files changed, 36 insertions, 32 deletions
diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 9bee0c4b2..44ab9a86a 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -137,8 +137,8 @@ sub bzr_author ($$) { } } -sub rcs_commit ($$$;$$) { - my ($file, $message, $rcstoken, $user, $ipaddr) = @_; +sub rcs_commit ($$$;$$$) { + my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_; $user = bzr_author($user, $ipaddr); @@ -156,10 +156,10 @@ sub rcs_commit ($$$;$$) { return undef; # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; $user = bzr_author($user, $ipaddr); diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 18491d517..a9fe162a1 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -183,7 +183,7 @@ sub rcs_prepedit ($) { return defined $rev ? $rev : ""; } -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. @@ -192,6 +192,7 @@ sub rcs_commit ($$$;$$) { my $rcstoken=shift; my $user=shift; my $ipaddr=shift; + my $emailuser=shift; return unless cvs_is_controlling; @@ -224,10 +225,10 @@ sub rcs_commit ($$$;$$) { return undef # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; if (defined $user) { $message="web commit by $user".(length $message ? ": $message" : ""); diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index f17fadcb1..345456c01 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -140,11 +140,11 @@ sub rcs_prepedit ($) { return $rev; } -sub rcs_commit ($$$;$$) { +sub rcs_commit ($$$;$$$) { # Commit the page. Returns 'undef' on success and a version of the page # with conflict markers on failure. - my ($file, $message, $rcstoken, $user, $ipaddr) = @_; + my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_; # Compute if the "revision" of $file changed. my $changed = darcs_rev($file) ne $rcstoken; @@ -239,8 +239,8 @@ sub rcs_commit ($$$;$$) { } } -sub rcs_commit_staged ($$$) { - my ($message, $user, $ipaddr) = @_; +sub rcs_commit_staged ($$$;$) { + my ($message, $user, $ipaddr, $emailuser) = @_; my $author; if (defined $user) { diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index a43b85920..b56f229d7 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -464,12 +464,12 @@ 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, $user, $ipaddr) = @_; + my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_; # Check to see if the page has been changed by someone else since # rcs_prepedit was called. @@ -485,10 +485,10 @@ sub rcs_commit ($$$;$$) { return rcs_commit_staged($message, $user, $ipaddr); } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; # Set the commit author and email to the web committer. my %env=%ENV; diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index a80bb2da5..1793ab4bb 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -126,8 +126,8 @@ sub rcs_prepedit ($) { return ""; } -sub rcs_commit ($$$;$$) { - my ($file, $message, $rcstoken, $user, $ipaddr) = @_; +sub rcs_commit ($$$;$$$) { + my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_; if (defined $user) { $user = IkiWiki::possibly_foolish_untaint($user); @@ -153,10 +153,10 @@ sub rcs_commit ($$$;$$) { return undef; # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; error("rcs_commit_staged not implemented for mercurial"); # TODO } diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index 67d4abbaa..55d8039e0 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -293,7 +293,7 @@ sub rcs_prepedit ($) { return get_rev(); } -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. @@ -302,6 +302,7 @@ sub rcs_commit ($$$;$$) { my $rcstoken=shift; my $user=shift; my $ipaddr=shift; + my $emailuser=shift; my $author; if (defined $user) { @@ -438,10 +439,10 @@ sub rcs_commit ($$$;$$) { return undef # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; # Note - this will also commit any spurious changes that happen to be # lying around in the working copy. There shouldn't be any, but... diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index 053652a5f..5131a1502 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -38,13 +38,13 @@ sub rcs_prepedit ($) { return "" } -sub rcs_commit ($$$;$$) { - my ($file, $message, $rcstoken, $user, $ipaddr) = @_; +sub rcs_commit ($$$;$$$) { + my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_; return undef # success } -sub rcs_commit_staged ($$$) { - my ($message, $user, $ipaddr)=@_; +sub rcs_commit_staged ($$$;$) { + my ($message, $user, $ipaddr, $emailuser)=@_; return undef # success } diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index d10b4888d..ffacb8cf9 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -144,7 +144,7 @@ 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. @@ -153,6 +153,7 @@ sub rcs_commit ($$$;$$) { my $rcstoken=shift; my $user=shift; my $ipaddr=shift; + my $emailuser=shift; if (defined $user) { $message="web commit by $user".(length $message ? ": $message" : ""); @@ -189,10 +190,10 @@ sub rcs_commit ($$$;$$) { return undef # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; if (defined $user) { $message="web commit by $user".(length $message ? ": $message" : ""); diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index f5ad0cc96..80c015e3c 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -98,12 +98,13 @@ sub rcs_prepedit ($) { } } -sub rcs_commit ($$$;$$) { +sub rcs_commit ($$$;$$$) { my $file=shift; my $message=shift; my $rcstoken=shift; my $user=shift; my $ipaddr=shift; + my $emailuser=shift; if (defined $user) { $message="web commit by $user".(length $message ? ": $message" : ""); @@ -139,10 +140,10 @@ sub rcs_commit ($$$;$$) { return undef # success } -sub rcs_commit_staged ($$$) { +sub rcs_commit_staged ($$$;$) { # Commits all staged changes. Changes can be staged using rcs_add, # rcs_remove, and rcs_rename. - my ($message, $user, $ipaddr)=@_; + my ($message, $user, $ipaddr, $emailuser)=@_; error("rcs_commit_staged not implemented for tla"); # TODO } |