+sub rcs_commit_staged ($$$) {
+ # Commits all staged changes. Changes can be staged using rcs_add,
+ # rcs_remove, and rcs_rename.
+ my ($message, $user, $ipaddr)=@_;
+
+ if (defined $user) {
+ $message="web commit by $user".(length $message ? ": $message" : "");
+ }
+ elsif (defined $ipaddr) {
+ $message="web commit from $ipaddr".(length $message ? ": $message" : "");
+ }
+
+ if (system("svn", "commit", "--quiet",
+ "--encoding", "UTF-8", "-m",
+ possibly_foolish_untaint($message),
+ $config{srcdir}) != 0) {
+ warn("svn commit failed\n");
+ return 1; # failure
+ }
+ return undef # success
+}
+