Page MenuHomePhabricator

Diffs using rev_id should work when one or both revisions are deleted
Open, MediumPublic

Description

Author: FT2.wiki

Description:
(Forked from bug 21279 comment 33 per Brion)

Per bug 21279, code will be patched so that deleted revisions can be referenced
by their rev_id, and this will work regardless of subsequent delete/undelete activity.

Once this is done, can diff handling be enhanced so that a correct diff will still be generated if one or both rev_id's are deleted revisions.

This would ensure that any diffs posted on-wiki or noted by users for future would be guaranteed to be capable of generation and review regardless of future deletion/undeletion.

At present a diff between arbitrary deleted revisions, or a deleted and non-deleted revision, is not possible, and if a revision is deleted then any diffs it was once part of, are no longer able to be displayed, even if the user has the appropriate viewing rights to both revisions.


Version: unspecified
Severity: normal

Details

Reference
bz28820

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:34 PM
bzimport set Reference to bz28820.

It's been a while since I poked the diff code, but I think it'll mostly need poking in two places:

  1. Actually fetching revs will need to be able to fall back to deleted versions, if you have sufficient permissions. This should be pretty easy.
  1. on finding the next/previous revision when not explicitly listed on the URL, which right now will just look in the revision table.

Even just fixing 1) would be *very* useful as it would make a lot of broken links work again.

  1. has a potential issue in that it could cause the same link to work differently depending on whether you have access to the deleted revs or not, which might end up confusing. Might want to think about things here.

FT2.wiki wrote:

A possible solution for 2) might be to produce the obvious diff (whatever that is) with a hat note

"This shows all edits between <X> and <Y>. There are <N> intermediate revisions. The edit immediately previous to <X> has been deleted. The diff for the single edit <X> can be viewed by administrators [LINK here]."

@brion: This issue has been assigned to you a while ago.
Could you please provide a status update and inform us whether you are still working (or still plan to work) on this issue?
Only in case you do not plan to work on this issue anymore, should the assignee be removed? Thanks.

Removing assignment from some tasks I'm not actively working on. Volunteers welcome, I'm happy to help if pinged!