Jump to content

Comparison window - Menu context - Diff option


EdDev

Recommended Posts

Hello there,

 

A few releases back a menu context has been added to the comparison window.

This is very useful to us, we are using the "diff" option to move to our favorite comparison tool.

So first, thanks a lot! :)

 

After playing with it a bit, it seems there is a bug there, as the "diff" does not compare the correct file revisions. It always compares the current one with the previous one (file context).

In many cases, the comparison is between current and previous changesets and between current file revision to the previous file revision.

(The comparison window shows the correct revisions of the files)

 

As a workaround, I check the two revisions shown in the comparison window, then open the file history and choose the two revision for comparison.

 

Thanks,

Ed.

Link to comment
Share on other sites

Maybe an example will clear things up:

 

Repo content:

- Two files, f1 & f2.

- Branches: /main , /main/mybranch.

- Changeset history: From CS#2 create a new branch, merge it back to main at CS#5.

[/MAIN] CS#1 --> CS#2 -----------------------> CS#5

[/MAIN/MYBRANCH]  \--- CS#3 --> CS#4--------^ (merge back to main)

 

File f1 history: No changes made to f1 in CS#2, changes done in CS#1,3,4.

As the file was changed only in source, it will not appear as part of CS#5 (in its history)

 

[/MAIN] CS#1 ------------------------------------------>

[/MAIN/MYBRANCH]  \--- CS#3 --> CS#4--------^

 

Now, when we double click CS#5 changeset, it shows the correct differences, between f1#1 and f1#4.

However, when right-clicking the file, and choosing "diff", it will compare between f1#3 and f1#4. (wrong diff from my perspective).

 

If you'll need to see it, we can do it on Monday.

 

Thanks,

Ed.

Link to comment
Share on other sites

I understand your scenario, but the thing is:

 

- When you are double-clicking, you are diffing changesets, that´s the reason you are getting the differences between cs:1 and cs:4

 

- When you right-click the file --> diff with prevous revison, you are getting the diferences betwwen revisions:  f1#revison3 and f1#revision4. You can select the option Diff --> diff revisions, and select a different one.

 

Best regards,

Carlos

Link to comment
Share on other sites

There is no such option (diff with a different revision) in that context.

The only option is "diff".

 

I just noted that the "default" diff in that context is wrong, it should diff between the intended revisions and not with the previous one.

 

Thanks,

Ed.

Link to comment
Share on other sites

Hi,

 

If you go to Items --> Right click --> Diff , you can choose previous revision or a different one.

 

If you double click CS#5, and then right clicking the file, you are diffing with previous revision:  f1#revison3 and f1#revision4

 

Regards,

Carlos

Link to comment
Share on other sites

Hi Ed,

 

we are about to start a task regarding this topic. We will try to unify the diff operation inside the pending changes view since it confusing for the users.

we'll keep this threat updated with the latest news.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...