Added a comment
[ikiwiki.git] / doc / forum / how_do_I_revert_edits_in_the_web_mode__63__.mdwn
1 Puzzled a bit :-/
2
3 > There is no explicit interface for reverting edits. Most of us use `git revert`. --[[Joey]]
4
5 >> That's a blow; I was planning on appointing no techies to keep law and order on our pages :-/ Is there a plugin or at least a plan to add such a 'in demand' feature?
6
7 >>> A lot of things complicate adding that feature to the web interface.
8 >>>
9 >>> First, ikiwiki happily uses whatever the VCS's best of breed web
10 >>> history interface is. (ie, viewvcs, gitweb). To allow reverting
11 >>> past the bottom of the RecentChanges page, it would need to have its 
12 >>> own history browser. Not sure I want to go there.
13 >>>
14 >>> And the mechanics of handling reverting can quickly get complex. 
15 >>> Web reverting should only allow users to revert things they can edit,
16 >>> but reverting a whole commit in git might touch multiple files.
17 >>> Some files may not be editable over the web at all. (The
18 >>> [[tips/untrusted_git_push]] also has to deal with those issues.)
19 >>> Finally, a revert can fail with a conflict. The revert could touch 
20 >>> multiple files, and multiple ones could conflict. The conflict may
21 >>> involve non-page files that can't be diffed. So an interface for
22 >>> resolving such a conflict could be hard.
23 >>> 
24 >>> Probably web-based reverting would need to be limited to reverting 
25 >>> single file changes, not whole commits, and not having very good
26 >>> conflict handling. And maybe only being accessible for changes
27 >>> still visible on RecentChanges. With those limitations, it's certianly
28 >>> doable (as a plugin even), but given how excellent `git revert` is in
29 >>> comparison, I have not had a real desire to do so. --[[Joey]]
30
31 >>>> Web edits are single-file anyway, so I wouldn't expect web reverts
32 >>>> to handle the multi-file case. OTOH, I've sometimes wished ikiwiki
33 >>>> had its own history browser (somewhere down my todo list). --[[schmonz]]
34
35 >>>> Yup, having a possibility to revert a single file would suffice.
36
37 ---
38
39 Perer Gammie and I are working on reversion over at [[todo/web_reversion]].
40 --[[Joey]] 
41
42 Update: Web reversion is now supported by ikiwiki. Only changes committed
43 to your wiki after you upgrade to the version of ikiwiki that supports it
44 will get revert buttons on the RecentChanges page. If you want to force
45 adding buttons for older changes, you can delete `recentchanges/*._change`
46 from your srcdir, and rebuild the wiki. --[[Joey]]