aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki.pm4
-rw-r--r--IkiWiki/Plugin/git.pm9
-rw-r--r--IkiWiki/Plugin/recentchanges.pm2
-rw-r--r--doc/plugins/write.mdwn6
-rw-r--r--doc/todo/web_reversion.mdwn4
5 files changed, 1 insertions, 24 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 466907c9d..269647eb4 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -1949,10 +1949,6 @@ sub rcs_revert (@) {
$hooks{rcs}{rcs_revert}{call}->(@_);
}
-sub rcs_showpatch (@) {
- $hooks{rcs}{rcs_showpatch}{call}->(@_);
-}
-
sub add_depends ($$;$) {
my $page=shift;
my $pagespec=shift;
diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm
index 5922494bc..3ccaa446a 100644
--- a/IkiWiki/Plugin/git.pm
+++ b/IkiWiki/Plugin/git.pm
@@ -29,7 +29,6 @@ sub import {
hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive);
hook(type => "rcs", id => "rcs_preprevert", call => \&rcs_preprevert);
hook(type => "rcs", id => "rcs_revert", call => \&rcs_revert);
- hook(type => "rcs", id => "rcs_showpatch", call => \&rcs_showpatch);
}
sub checkconfig () {
@@ -865,12 +864,4 @@ sub rcs_revert (@) {
}
}
-sub rcs_showpatch (@) {
- # Show the patch with the given revision id.
- my %params = @_;
- my $rev = $params{rev};
-
- return join "\n", run_or_die('git', 'show', $rev);
-}
-
1
diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm
index 7e71d4fc3..948bb1366 100644
--- a/IkiWiki/Plugin/recentchanges.pm
+++ b/IkiWiki/Plugin/recentchanges.pm
@@ -117,7 +117,7 @@ sub sessioncgi ($$) {
}
else {
$form->title(sprintf(gettext("confirm reversion of %s"), $rev));
- my $patch_contents = IkiWiki::rcs_showpatch(rev => $rev);
+ my $patch_contents = IkiWiki::rcs_diff($rev);
$form->tmpl_param(patch_contents => encode_entities($patch_contents));
$form->field(name => "rev", type => "hidden", value => $rev, force => 1);
IkiWiki::showform($form, $buttons, $session, $q);
diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn
index 1bd3b0f87..3eade34ee 100644
--- a/doc/plugins/write.mdwn
+++ b/doc/plugins/write.mdwn
@@ -1212,12 +1212,6 @@ It should try to revert the specified rev, which includes committing
the reversion, and returns undef on _success_ and an error message
on failure.
-#### `rcs_showpatch(@)`
-
-This is passed a named parameter rev that is a RCS-specific
-change ID. It should generate a diff-style patch showing the changes
-made and return it.
-
### PageSpec plugins
It's also possible to write plugins that add new functions to
diff --git a/doc/todo/web_reversion.mdwn b/doc/todo/web_reversion.mdwn
index 33fa79aad..7cb412f79 100644
--- a/doc/todo/web_reversion.mdwn
+++ b/doc/todo/web_reversion.mdwn
@@ -55,7 +55,6 @@ Peter Gammie has done an initial implementation of the above.
> (The data from `rcs_preprevert` could also be used for a confirmation
> prompt -- it doesn't currently include enough info for diffs, but at
> least could have a list of changed files.)
->> I added `rcs_showpatch` which simply yields the output of `git show <patch-id>`. -- [[peteg]]
>
> Note that it's possible for a git repo to have commits that modify wiki
> files in a subdir, and code files elsewhere. `rcs_preprevert` should
@@ -71,9 +70,6 @@ Peter Gammie has done an initial implementation of the above.
>>> (and fixed all the indention..). Issues I noticed but have not gotten
>>> to: --[[Joey]]
>>>> Please change the git pointer above, then. I will work on your branch. -- [[peteg]]
->>>
->>> * `rcs_diff` already exists; why add `rcs_showpatch`?
->>>> If `rcs_diff` is intended for human consumption, by all means we can use that. -- [[peteg]]
>>> * Would it be better for `rcs_revert` to not commit, and
>>> `rcs_commit_staged` to then be used? This would work for git, but