+2
Completed

Add button for explicit big file diff

Iulian Onofrei 4 years ago updated 2 years ago 7

I have a big file which couldn't get diffed in the main window. So I increased the size limit in the preferences file, but now, every time I select it, the diff process starts automatically and hands the background thread of the app (the UI is not blocked though). Even if I just want to commit it.


For binary files, there is a button named "Force Text", which works similar to my idea, which sounds like this:


The user changed the diff limit size:

- Y:

- the user selects a file whose size is bigger than the default one:

- Y: a "Force Diff" button appears

- the user presses the button: the diff process starts

- N: the diff process starts

- N:

- the user selects a file whose size is bigger than the default one:

- Y: the "File is too large to display." message appears (optionally, with a button that (creates? and) opens the preference file, or better yet, move those configurations in the UI)

- N: the diff process starts


Let me know if I was clear enough!


Thank you,

Iulian Onofrei

GOOD, I'M SATISFIED
Satisfaction mark by Iulian Onofrei 1 year ago

> "So I increased the size limit in the preferences file,"


How do you do that exactly?


Also, this should not be in the "Praises" section, since it's a feature request.

> How do you do that exactly?

https://www.syntevo.com/doc/display/SG/VM+options


> Also, this should not be in the "Praises" section, since it's a feature request.

Indeed, but for me (and probably others), it's very important to have it.

Hmm, that doesn't work for me.


However, if I edit smartgit.properties


and add


smartgit.compare.maximumFileSize=10000000


it seems to work

Sorry, indeed the `smartgit.properties` needs to be edited.

I was thinking about this and the easiest solution would be to just add a Force diff button when the diff limit size is exceeded.


The reason for this is that I could reset the limit to the default value, so it doesn't hang or increase the CPU whenever I select one big file, but at the same time I do need the diff sometimes, in which case I could just hit the new Force diff button. And upon selecting another file and then the big file again, the diff won't show up until I click the button again.

+2
Completed

That's how I implemented it now for the next 18.2 preview build.

It looks to me like it still computes the diff, and only after it finishes does it present the "File size exceeds ..." message. Because when I click the "Force Compare" button, it takes the same amount of time.