that may contain the username component of the email address of
the user making the commit.
-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);
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);
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.
my $rcstoken=shift;
my $user=shift;
my $ipaddr=shift;
my $rcstoken=shift;
my $user=shift;
my $ipaddr=shift;
return unless cvs_is_controlling;
return unless cvs_is_controlling;
-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" : "");
-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;
-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) {
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.
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;
-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);
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
}
-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.
my $rcstoken=shift;
my $user=shift;
my $ipaddr=shift;
my $rcstoken=shift;
my $user=shift;
my $ipaddr=shift;
my $author;
if (defined $user) {
my $author;
if (defined $user) {
-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...
-sub rcs_commit ($$$;$$) {
- my ($file, $message, $rcstoken, $user, $ipaddr) = @_;
+sub rcs_commit ($$$;$$$) {
+ my ($file, $message, $rcstoken, $user, $ipaddr, $emailuser) = @_;
-sub rcs_commit_staged ($$$) {
- my ($message, $user, $ipaddr)=@_;
+sub rcs_commit_staged ($$$;$) {
+ my ($message, $user, $ipaddr, $emailuser)=@_;
-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.
my $rcstoken=shift;
my $user=shift;
my $ipaddr=shift;
my $rcstoken=shift;
my $user=shift;
my $ipaddr=shift;
if (defined $user) {
$message="web commit by $user".(length $message ? ": $message" : "");
if (defined $user) {
$message="web commit by $user".(length $message ? ": $message" : "");
-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" : "");
-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;
if (defined $user) {
$message="web commit by $user".(length $message ? ": $message" : "");
if (defined $user) {
$message="web commit by $user".(length $message ? ": $message" : "");
-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
}
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
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