Description
If you try to create a diff between a non existing revision number, and an existing one, you get junk diff, for revision 1 and 99999999. It looks like a reverse diff of revision 1.
Steps to reproduce
- Try a diff and enter revision number manually, see examples.
Example
http://moinmoin.wikiwikiweb.de/FrontPage?action=diff&rev2=400&rev1=381
http://moinmoin.wikiwikiweb.de/FrontPage?action=diff&rev2=400&rev1=1
Details
This wiki.
Workaround
Discussion
When the revision number is larger then the highest revision, or smaller then the first revision, it make sense to normalize the values. For example, if rev2 is 1000 and rev1 is -500, rev2 will be normalized to the last revision, and rev1 to the first.
Examples:
request: http://moinmoin.wikiwikiweb.de/FrontPage?action=diff&rev2=400&rev1=381
result: http://moinmoin.wikiwikiweb.de/FrontPage?action=diff&rev2=381&rev1=381
request: http://moinmoin.wikiwikiweb.de/FrontPage?action=diff&rev2=400&rev1=0
result: http://moinmoin.wikiwikiweb.de/FrontPage?action=diff&rev2=381&rev1=1
In each case, the current behavior does not make sense, and the proposed behavior is better then an error message.
This is not a big problem since the user interface never(?) create diffs with out of range values, but if you create the query manually, or with some other client software, it can happen. I use this sometime because its too hard to go through all revisions of some page, and see what was the change in each revision. Easier to type in the url then to scroll down, pick two revisions, then scroll up just to see the diff button, then click it. We need a simple "Next" and "Previous" diffs button in the diff preview page.
As a user, you like normalization, as the author of a client software, you would like an error reply. The current behavior helps nobody.
Plan
- Priority: low, very rare problem
- Assigned to:
- Status: Not a bug, undefined behaviour, no junk really seen, only a diff that looks like deletion