return reverse @rets;
}
-sub rcs_preprevert (@) {
- my %params = @_;
- my $rev = $params{rev};
-
- # Note test_changes expects 'cgi' and 'session' parameters.
- require IkiWiki::Receive;
- IkiWiki::Receive::test_changes(%params, changes =>
- [git_parse_changes(git_commit_info($rev, 1))]);
+sub rcs_preprevert ($) {
+ my $rev=shift;
+
+ return git_parse_changes(git_commit_info($rev, 1));
}
sub rcs_revert ($) {
# Try to revert the given rev; returns undef on _success_.
- my $rev = $shift;
+ my $rev = shift;
if (run_or_non('git', 'revert', '--no-commit', $rev)) {
return undef;
return unless $do eq 'revert' && $rev;
- $IkiWiki::hooks{rcs}{rcs_preprevert}{call}->(
- cgi => $q, session => $session, rev => $rev);
+ my @changes=$IkiWiki::hooks{rcs}{rcs_preprevert}{call}->($rev);
+ require IkiWiki::Receive;
+ IkiWiki::Receive::test_changes(
+ cgi => $q,
+ session => $session,
+ changes => \@changes,
+ );
my ($form, $buttons) = confirmation_form($q, $session);
IkiWiki::decode_form_utf8($form);