]> sipb.mit.edu Git - ikiwiki.git/commitdiff
remove rcs_showpatch
authorJoey Hess <joey@kitenet.net>
Wed, 6 Oct 2010 18:39:10 +0000 (14:39 -0400)
committerJoey Hess <joey@kitenet.net>
Wed, 6 Oct 2010 18:39:10 +0000 (14:39 -0400)
IkiWiki.pm
IkiWiki/Plugin/git.pm
IkiWiki/Plugin/recentchanges.pm
doc/plugins/write.mdwn
doc/todo/web_reversion.mdwn

index 466907c9db12ca308aed17a270c57326d0e64aff..269647eb4cb785439dfb4c2b4baff3a2f33d737b 100644 (file)
@@ -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;
index 5922494bce8859124b99dcd53613ca7c49320fe6..3ccaa446a344f2dee24a4d277c2b803b8a7ff888 100644 (file)
@@ -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
index 7e71d4fc3783740a4c1d76fb7966924097021333..948bb1366413f4ebfc14b5fd54632d40fa7b44e8 100644 (file)
@@ -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);
index 1bd3b0f871b34855712417906c711e0100cd7473..3eade34ee1e54244554d704a9b75baa4e1d07a28 100644 (file)
@@ -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
index 33fa79aad8474a4d91358ce95d571d01a425da8d..7cb412f79be8345e4ee595b08e8dcecfaf93e1cb 100644 (file)
@@ -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