Edgewall Software

Opened 16 years ago

Closed 13 years ago

#4083 closed defect (fixed)

Revision Log should not allow viewing changes out-of-order

Reported by: jrivers@… Owned by: Christian Boos
Priority: low Milestone: 0.11.6
Component: version control/log view Version: 0.10
Severity: minor Keywords: history
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:


When viewing the revision log for a file, the default option is set up so that pressing "View Changes" will give you a diff for the last revision of the file, which is fine. However, the user can easily make trac give you a backwards diff, for which the output is confusing (a change where text was deleted says that text was added instead).

I suggest something like Wikipedia's interface, where it's impossible to see this kind of diff. Another option would be to provide a warning to the user if they tried that, or to detect it and show a forward diff.

If there is a real reason to show a backwards diff, perhaps a special option could be enabled somewhere…

(sorry for not knowing the component)

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 16 years ago

Component: generallog view
Owner: changed from Jonas Borgström to Christian Boos
Priority: normallow

Yes, this is worth considering for the following reasons:

  • the column containing the radio buttons doesn't say anything about which is the old, which is the new rev
  • in order to be consistent with the Wiki Page History, which always shows forward diffs
  • getting a backward diff is occasionally useful (e.g. for generating a diff to revert changes), but it's easy to get there from the "forward" diff view, by following the Reverse Diff found there

So a bit a Javascript magic is in order ;)

comment:2 by Christian Boos, 16 years ago

Keywords: history added
Milestone: 1.0

comment:3 by osimons, 14 years ago

I hadn't even noticed the 'Reverse diff' option before now :-)

Anyway, I don't think comparing wiki features with version control on this is all that useful - having the option by radio buttons to diff both ways is somewhat useful.

Here is a very simple solution: We put an arrow in the column header that points to the right. That should to any (most) that deal with source code imply the 'from' and 'to'. If the radios are reversed it should be (somewhat) equally obvious that you get a reverse diff.

Lastly, we could also consider jquery magic to switch the direction of the arrows if from > to, with just an em-dash if the selection is the same (ie. no no diff). The left-to-right arrow would however work fine with javascript disabled as well, so no dependency on it for the general clarification.

comment:4 by Christian Boos, 13 years ago

Resolution: fixed
Status: newclosed

I agree that getting a reverse diff directly from the log is useful, we should keep this feature.

In r8412, I added some hints about the role of the radiobuttons, this is hopefully enough to address the usability concerns raised here.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.