Page MenuHomePhabricator

Allow several edits to be undone
Closed, ResolvedPublic

Description

Author: lupin.wp

Description:
Clicking undo from a page showing the diff for non-consecutive revisions should
attempt to undo the cumulative effect of all of the intervening edits, not
merely the final edit.

For example, consider an article with four consecutive revisions, r1,r2,r3,r4.
If I view the diff page for diff(r2,r3) I can currently hit undo to try to patch
r4 with diff(r3,r2). This is good.

However, if I view diff(r1,r3) and hit undo, r4 is still just patched with
diff(r3,r2); that is, only one edit is undone. I think that r4 should be patched
with diff(r3,r1) to undo the cumulative effect of both edits between r1 and r3.
This would be useful if, for example, both of these edits are vandalism.

The current behaviour is also confusing, as the effect of hitting undo does not
correspond with what is displayed on the diff page diff(r1,r3).


Version: 1.8.x
Severity: normal

Details

Reference
bz8133

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:29 PM
bzimport set Reference to bz8133.
bzimport added a subscriber: Unknown Object (MLST).

There's also been talk of removing the (undo) button from multi-revision diffs.
I think this is probably a more sensible option.

ayg wrote:

I think probably less. Why drop a potentially handy feature rather than
extending it?

DiffEng: change Undo link construction for undoing several edits

attachment diffeng.patch ignored as obsolete

EditPage: Undo uses two params now; can revert several edits

attachment editpage.patch ignored as obsolete

Update editpage; change summary schema

OK, this now uses "undo-summary" language only when one revision was undone and
"undo-summary_set" for muli-edit undoing.

The following can then be added to the en lang stuff:
'undo-summary_set' => 'Undo revisions $1 (by [[Special:Contributions/$3]]) to
$2 (by [[Special:Contributions/$4]])'

attachment editpage.patch ignored as obsolete

The other 6 (and later more) langs need updating as well for this to work.

Those links above aren't piped...

Actually, for multi edit reverts, the summary should just use regular userpage
links given the cutoff length.

Update; DiffEng, remove undo links from top diffs

attachment diffeng.patch ignored as obsolete

DiffEng; put undo links back on top diffs

Attached:

I've reverted that in r20755; it appears to make incompatible changes to the URI
parameters for operating the undo feature, which is:

a) gratuitously annoying

b) would break user JS tools based on it

cbm.wikipedia wrote:

The automatic edit summary for undoing multiple versions was in the original
attachment 2868 but was never implemented. Could someone add that in?

Last part of attachment 2868, which wasn't applied

Attached:

Setting backed to fixed, the bug was to enable multi-edit undo and it was done.

Summaries for multi-edit undo must be manual, as any automatic one would just be
to hard to read and be useful.

If you want summaries for that anyway, make a new bug report.