]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
API: rcs_commit and rcs_commit_staged are passed a new parameter
authorJoey Hess <joey@kitenet.net>
Wed, 23 Jun 2010 20:05:49 +0000 (16:05 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 23 Jun 2010 20:05:49 +0000 (16:05 -0400)
that may contain the username component of the email address of
the user making the commit.

IkiWiki/Plugin/bzr.pm
IkiWiki/Plugin/cvs.pm
IkiWiki/Plugin/darcs.pm
IkiWiki/Plugin/git.pm
IkiWiki/Plugin/mercurial.pm
IkiWiki/Plugin/monotone.pm
IkiWiki/Plugin/norcs.pm
IkiWiki/Plugin/svn.pm
IkiWiki/Plugin/tla.pm
debian/changelog
doc/plugins/write.mdwn

index 9bee0c4b27611eda8966a05c773cd6e7930802d9..44ab9a86a207bf11637f3249d5247a98ceecf32f 100644 (file)
@@ -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);
 
 
        $user = bzr_author($user, $ipaddr);
 
@@ -156,10 +156,10 @@ sub rcs_commit ($$$;$$) {
        return undef; # success
 }
 
        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.
        # 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);
 
 
        $user = bzr_author($user, $ipaddr);
 
index 18491d5171089abd8bd75b8f5aed8ed4a3ef2e05..a9fe162a1b7957e4f10e16163bea303b36936b7c 100644 (file)
@@ -183,7 +183,7 @@ sub rcs_prepedit ($) {
        return defined $rev ? $rev : "";
 }
 
        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.
        # 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 $rcstoken=shift;
        my $user=shift;
        my $ipaddr=shift;
+       my $emailuser=shift;
 
        return unless cvs_is_controlling;
 
 
        return unless cvs_is_controlling;
 
@@ -224,10 +225,10 @@ sub rcs_commit ($$$;$$) {
        return undef # success
 }
 
        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.
        # 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" : "");
 
        if (defined $user) {
                $message="web commit by $user".(length $message ? ": $message" : "");
index f17fadcb10ef5a66b5530ae6d65d41b175a186b7..345456c01d01d6a6b66bc72640c68ded0940d633 100644 (file)
@@ -140,11 +140,11 @@ sub rcs_prepedit ($) {
        return $rev;
 }
 
        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.
 
        # 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;
 
        # 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) {
 
        my $author;
        if (defined $user) {
index a43b8592048a54d0e9cd91565bb95f5d4510ab3c..b56f229d7c146aa3e8c65b42b44389d261eb5c59 100644 (file)
@@ -464,12 +464,12 @@ sub rcs_prepedit ($) {
        return git_sha1($file);
 }
 
        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.
 
        # 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.
 
        # 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);
 }
 
        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.
        # 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;
 
        # Set the commit author and email to the web committer.
        my %env=%ENV;
index a80bb2da59ddf91772bfa8928652fe1cff02f186..1793ab4bb3f01d0abc22c4b70128b51fa3d6aa5c 100644 (file)
@@ -126,8 +126,8 @@ sub rcs_prepedit ($) {
        return "";
 }
 
        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);
 
        if (defined $user) {
                $user = IkiWiki::possibly_foolish_untaint($user);
@@ -153,10 +153,10 @@ sub rcs_commit ($$$;$$) {
        return undef; # success
 }
 
        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.
        # 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
 }
        
        error("rcs_commit_staged not implemented for mercurial"); # TODO
 }
index 67d4abbaaed4792a35fc405eee55506a669a4018..55d8039e0f959d71b7e5ab7bac8a0a0fbede0de8 100644 (file)
@@ -293,7 +293,7 @@ sub rcs_prepedit ($) {
        return get_rev();
 }
 
        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.
        # 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 $rcstoken=shift;
        my $user=shift;
        my $ipaddr=shift;
+       my $emailuser=shift;
        my $author;
 
        if (defined $user) {
        my $author;
 
        if (defined $user) {
@@ -438,10 +439,10 @@ sub rcs_commit ($$$;$$) {
        return undef # success
 }
 
        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.
        # 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...
        
        # Note - this will also commit any spurious changes that happen to be
        # lying around in the working copy.  There shouldn't be any, but...
index 053652a5f8f86db533f45db98c315ec8527ebe8a..5131a1502c474f29e0e873d60ec78af5e552f5a0 100644 (file)
@@ -38,13 +38,13 @@ sub rcs_prepedit ($) {
        return ""
 }
 
        return ""
 }
 
-sub rcs_commit ($$$;$$) {
-       my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+sub rcs_commit ($$$;$$$) {
+       my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_;
        return undef # success
 }
 
        return undef # success
 }
 
-sub rcs_commit_staged ($$$) {
-       my ($message, $user, $ipaddr)=@_;
+sub rcs_commit_staged ($$$;$) {
+       my ($message, $user, $ipaddr, $emailuser)=@_;
        return undef # success
 }
 
        return undef # success
 }
 
index d10b4888d94b35bbdc29762256e16fbdfaf8fecb..ffacb8cf9534a2055d945224a60bd98fc12e14b7 100644 (file)
@@ -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.
        # 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 $rcstoken=shift;
        my $user=shift;
        my $ipaddr=shift;
+       my $emailuser=shift;
 
        if (defined $user) {
                $message="web commit by $user".(length $message ? ": $message" : "");
 
        if (defined $user) {
                $message="web commit by $user".(length $message ? ": $message" : "");
@@ -189,10 +190,10 @@ sub rcs_commit ($$$;$$) {
        return undef # success
 }
 
        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.
        # 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" : "");
        
        if (defined $user) {
                $message="web commit by $user".(length $message ? ": $message" : "");
index f5ad0cc96bd658810492880f9c91bf87c60bdc92..80c015e3cff881b8c59bd985647a73ae93bb6ca4 100644 (file)
@@ -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 $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" : "");
 
        if (defined $user) {
                $message="web commit by $user".(length $message ? ": $message" : "");
@@ -139,10 +140,10 @@ sub rcs_commit ($$$;$$) {
        return undef # success
 }
 
        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.
        # 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
 }
        
        error("rcs_commit_staged not implemented for tla"); # TODO
 }
index 01d0abb47b9b2c87910e3c3cf3d069fccacfaa2b..2dfebd0b2eab8442be461aefe1643c891d83ea6e 100644 (file)
@@ -1,6 +1,9 @@
 ikiwiki (3.20100624) UNRELEASED; urgency=low
 
 ikiwiki (3.20100624) UNRELEASED; urgency=low
 
-  * Add new optional field usershort to rcs_recentchanges.
+  * API: Add new optional field usershort to rcs_recentchanges.
+  * 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.
 
  -- Joey Hess <joeyh@debian.org>  Wed, 23 Jun 2010 15:30:04 -0400
 
 
  -- Joey Hess <joeyh@debian.org>  Wed, 23 Jun 2010 15:30:04 -0400
 
index 5f0e95a9fe8bd3089a6a8dd717ae0afc981514ea..ab2934bf14d22b01a1fcdd283cfb2320cf5b3e8f 100644 (file)
@@ -1051,15 +1051,17 @@ token, that will be passed into `rcs_commit` when committing. For example,
 it might return the current revision ID of the file, and use that
 information later when merging changes.
 
 it might return the current revision ID of the file, and use that
 information later when merging changes.
 
-#### `rcs_commit($$$;$$)`
+#### `rcs_commit($$$;$$$)`
 
 
-Passed a file, message, token (from `rcs_prepedit`), user, and ip address.
+Passed a file, message, token (from `rcs_prepedit`), user, ip address,
+and optionally the username component of the committer's email address.
 Should try to commit the file. Returns `undef` on *success* and a version
 of the page with the rcs's conflict markers on failure.
 
 Should try to commit the file. Returns `undef` on *success* and a version
 of the page with the rcs's conflict markers on failure.
 
-#### `rcs_commit_staged($$$)`
+#### `rcs_commit_staged($$$;$)`
 
 
-Passed a message, user, and ip address. Should commit all staged changes.
+Passed a message, user, ip address, and optionally the username component of
+the committer's email address. Should commit all staged changes.
 Returns undef on success, and an error message on failure.
 
 Changes can be staged by calls to `rcs_add`, `rcs_remove`, and
 Returns undef on success, and an error message on failure.
 
 Changes can be staged by calls to `rcs_add`, `rcs_remove`, and