P3D3::Diff view could use current changeset selection of history view

Create issue
Issue #38 resolved
Marko Käning created an issue

I think it would be from a usability POV very nice to have the following possibility:

1) Suppose the user selects two changesets in the "History" view

2) User toggles view mode to "Diff" view

3) "Diff" view automagically preselects the two changesets from "History" view and shows their diffs right away

Furthermore if the user selected only ONE changeset in "History" view MacHg could offer that as the changeset to compare against right from the start.

How does that sound?

//If the user, however, selected more than one changeset, I guess one would have to find a way to deal with it in a deterministic manner, although I don't really understand now why one actually can select more than two changesets in "History" view anyways... But perhaps it has to do with patches, queues or undos and stuff!?//

Comments (10)

  1. Jason Harris repo owner
    • changed status to open

    This is a good suggestion. Thanks! I will do it.

    Right now you can select multiple lines and if you double click on them it will open the differences between the earliest revision to the latest version in FileMerge on a file by file basis.

    You can also select multiple revisions and when you do history editing, the editing window comes pre loaded with what you selected. And as you say patches... You can do an export of multiple patches and the selected files get preloaded into the export patches dialog.

  2. Marko Käning reporter
    • changed status to open
    • marked as bug

    Hi Jason,

    sorry for opening this again, but I noticed that the index of the base revision is one lower than it actually should be.

    If you select e.g. revs. 200 and 210 in the history view you'll get in diff view selection of revs. 199 and 210.

    Greets, Marko

  3. Jason Harris repo owner

    No problem about opening this again! But I think this is the intended behavior. Certainly if you just have one revision selected say 200 and then you switch to the differences view then you want the base to be 199 and the compare to be 200. Thus its the same if you have 200 and 201 selected in the history view. You want to see that changes that happened in 200 and 201. ie the base is 199 and the compare is 201. Thus I think this is as designed. If I have convinced you go ahead and close this again :) If not lets chat... Thanks!

    Cheers, Jas

  4. Former user Account Deleted

    Hi Jason,

    I always understood it as the difference between rev 200 and 201 and not the sum of changes in 200 + 201. I guess this should be kept in line with mercurial's "hg diff -r 200:201" command!

    Greets, Marko

  5. Former user Account Deleted

    Hi Jason,

    I always understood it as the difference between rev 200 and 201 and not the sum of changes in 200 + 201. I guess this should be kept in line with mercurial's "hg diff -r 200:201" command!

    Greets, Marko

  6. Jason Harris repo owner

    But if you select a single revision (say 200) in the history view and then switch to the differences view you want to see the differences right? What changed in revision 200 right? I think it would be quite odd to see nothing in the differences view.

    Given that, then if you do hg diff -r 200:200 you don't see any differences. You only see differences when looking at --rev 199:200, thus this singleton case drives the cases of the others. Ie if you then select 199 and 200 in the history view do you want to see the exact same results when switching to the diff view as when you selected just 200 in the history view? That would be odd I think...

    Thus overall when you select revisions in the history view, when you switch to the differences view you are shown the changes in what you selected. Its consistent and I think a pretty reasonable interpretation...

  7. Marko Käning reporter

    If it's only about one revision (e.g. 200) I am with you, right, that's what you want to see.

    What concerns the selection of two revisions I still think that one wants to see the differences between the revisions selected, excluding the differences introduced by the starting changeset.

    If I am the only one who finds this approach odd and since your interpretation is indeed reasonable, I withdraw. ;-)

  8. Jason Harris repo owner

    Hi Marko,

    I have mulled this over for the last couple of days and I think the current behavior is correct. Of course if there is an outcry from others I am happy to reopen this, but for now the behavior is consistent and I think good so I'll mark it again as resolved. Anyone else have strong opinions on this? Again thanks for your comments Marko!

    Thanks, Jason

  9. Log in to comment