Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 303 forks source link

CompareTool is launched permanently #1433

Open hoppfrosch opened 8 years ago

hoppfrosch commented 8 years ago

Short Summary

Each time starting Komodo 10, my Compare-Tool is launched (opening a random comparison of a file from project against its VCS-version). Closing the CompareTool and reactivating Komodo relaunches the CompareTool (files/folders to be compared look randomly choosen)

In my production environment I have configured BeyondCompare as external CompareTool for Komodo and everything works as expected. Installing KomodoIde 10 beta the settings for external CompareTool are taken automatically from KomodoIDE9. I haven't found an preference setting yet in Komodo10, to change the external CompareTool

Steps to Reproduce

?

Expected results

Starting and reactivating Komodo should not launch my external CompareTool

Actual results

see above

Platform Information

KomodoIde beta 10 build 89113 (and previous) Win7 Ultimate SP1 git 2.8.0 for windows as VCS BeyondCompare 3.3.13

Developer Edit

We need to force GIT_EXTERNAL_DIFF to be empty on any implicit diff calls and use whatever the user provided for any explicit diff calls.

Naatan commented 8 years ago

Could you please explain how you configured your system to use a specific compare tool?

hoppfrosch commented 8 years ago

Hmmmm ... I configured this quite a while ago at Release of Komodo 8(?) and cannot remember exactly. Yet I cannot find any options anymore to configure the difftool exactly within Komodo (neither Komodo 9 nor 10). Within git (which I use as VCS) I've cinfigured BeyondCompare as difftool with the following settings (file .gitconfig):

diff.tool=bc3 diff.guitool=bc3 difftool.prompt=false difftool.bc3.cmd='D:/BeyondCompare/BComp.exe' "$LOCAL" "$REMOTE" difftool.sourcetree.cmd='D:/BeyondCompare/BComp.exe' "$LOCAL" "$REMOTE"

What I can say for sure: I have not changed any configuration of my preferred difftool for git since a loooong time - and the difftool used to work within komodo without any flaws until installing Komodo 10 beta (and it currently still works within Komodo 9 without any errors ...)

Naatan commented 8 years ago

I've tried reproducing the diff.tool settings (the difftool.* settings don't take) but I still cannot reproduce the issue.

If you check Preferences > Environment, are there any variables there that relate to diff tools or git? Can you share them?

hoppfrosch commented 8 years ago

Concerning git/difftool: All I found within Preferences > Environment was the following komodo_2016-05-12_10-17-33

Maybe my difftool.* settings origin from my used git-client (Atlassian SourceTree or Gitkraken)

Naatan commented 8 years ago

I still cannot reproduce it after replicating those settings. Maybe it's a windows only issue though. @cgchoffman could you try?

th3coop commented 8 years ago

I'm not able to reproduce this either. Komodo starts normally and no compare appears with random files. This sounds like a Userscript or Addon is running at start up. @hoppfrosch, have you tried Help > Troubleshooting > Restart without Addons / Restart without tools?

hoppfrosch commented 8 years ago

@cgchoffman: Just tested both variants (wo AddOns/ wo Tools) - with the same effect: the DiffTool appears .... :-(

Where do I configure the difftool to be used with Komodo? I cannot remember how I did this a long time ago ...


Edit: The error does not occur after "Restart in SafeMode" - but it does occur after "Restart without Addons" and "Restart without Tools"

Naatan commented 8 years ago

Komodo doesn't currently offer a way to specify your own diff app.

Could you try removing the GIT_EXTERNAL_DIFF env variable? Although using that did not give me the same issue as you, it did give me some odd behaviour.

hoppfrosch commented 8 years ago

I'll try removing ...

Komodo doesn't currently offer a way to specify your own diff app.

What are the checkboxes for external diff within komodo preferences for?

hoppfrosch commented 8 years ago

I failed removing GIT_EXTERNAL_DIFF via Komodo preferences since it's set as "Startup environment variable" and does not activate the deltre-button when selecting it from the environment listing ...

Naatan commented 8 years ago

Try adding it to the user env variables and making the value empty

hoppfrosch commented 8 years ago

I did ... and everything works like expected - but my external difftool is not available anymore ;-)

I think, I found a possible reason: The bottom pane has a few tabs ("Version Control", "Breakpoints" ....). Starting Komodo a certain console is opened - in my case the "first" (leftmost) tab "Version Control" - with the sub-Tab "Commit Changes". The "Commit Changes" contain a diff view ....

Each time I open Komodo the "Version Control"-"Commit changes"-Tab on the bottom panel is opened and the changes of the last opened file are to be shown. Having configured an external-difftool this launches the external difftool

I tried to reorder the tabs on the bottom panel - and restarted after reording. But the original ordering was restored after this (having the "Version Control"-"Commit changes"-Tab as a first tab).

hoppfrosch commented 8 years ago

I filed a new issue: #1519 concerning persistent storage of pane tab ordering

Naatan commented 8 years ago

That is indeed what is triggering a diff, but that is not the cause of the issue.

So forcing GIT_EXTERNAL_DIFF to be empty solved the issue, but now you cannot trigger your own external diff anymore (I assume you want this to show when explicitly opening a diff from within Komodo), do I have that right?

hoppfrosch commented 8 years ago

Yes - explicitly opening a diff from within komodo does not work without having GIT_EXTERNAL_DIFF set (as expected)

Naatan commented 8 years ago

Alright, perfect. I understand the problem and your desired use-case now. Thank you!

hoppfrosch commented 8 years ago

Just as a hint: git_GUIs like Atlassian SourceTree do support an external diff as well. This is only opened, if the user triggers it - if the Application itself needs to display a diff, applications intenral diff view is used. Applied to Komodo in my use case would look like this: if "Version Control"-"Commit changes"-Tab is opened, Komodo does not open the external diff, but show the diff in its own diff-view. If the user wants to show the diffs in external diff, he has to trigger this explicitly (for example via context menu) ...

garak commented 8 years ago

Getting same problem with: Komodo IDE, version 10.0.0, build 89159 Ubuntu 16.04 git 2.7.4 meld

Naatan commented 8 years ago

@hoppfrosch right, that's exactly what I mean by implicit vs explicit :)

hoppfrosch commented 8 years ago

@Naatan: As you've might noticed I'm not a native english speaker, so I might miss some details ;-)

sfsccn commented 8 years ago

Not sure if the resolution implied above addresses the issues I'm having. I just upgraded from 9.3.0 to 10.0.1. Now when I edit a git-tracked document my graphical diff program (p4merge) pops up whenever I save the document. This is, of course, very disruptive.

My temporary solution is to disable the external git diff tool by removing the [merge], [mergetool] and [diff] sections from ~/.gitconfig.

I'd like to reinstate my external graphical diff tool, will the resolution above do this?

I also tried modifying Preferences/SCC/Git by checking "Uses an external diff tool" (I'm really not sure what this does) and adding "--no-ext-diff" to "Diff options" but these had no effect. I didn't find anything relevant in Preferences/Environment.

The problem seems occur no matter what tab is selected in the bottom pane: Version Control, Breakpoints, etc. Not sure if I understood the discussion above on that.

OS: Linux 3.10.0-327.28.2.el7.x86_64 Git: 2.6.1

Help appreciated, thanks!

tonyattwood commented 8 years ago

Hello!

I wanted to tell you that I'm doing fine, even better that ever, you may find the reasons of it here http://bynintope.gocreditsolutions.com/e4qdd

Sent from a prehistoric stone tablet, tony.attwood

tonyattwood commented 8 years ago

Greetings!

Do you want to take a look at the coolest things ever? Here is the link http://reach.zachstepan.org/e4vbrnf

Hugs, tony.attwood

tomwitt2 commented 7 years ago

Just another data point.

This is not a git specific issue. Komodo causes my subversion external-diff tool to launch multiple times on every file save. The only place I've defined my diff tool is in my ~/.subversion/config file. I can only get this crazy behavior to stop by commenting out the diff tool definition in ~/.subversion/config

### Section for configuring external helper applications.
[helpers]
### Set diff-cmd to the absolute path of your 'diff' program.
###   This will override the compile-time default, which is to use
###   Subversion's internal diff implementation.
# diff-cmd = diff_program (diff, gdiff, etc.)
# diff-cmd = /home/tom/bin/meld_svn.sh # <--- disabled to stop rampant Komodo diff'ing.

The behavior is kind of predictable in the sense that Komodo seems to set a file watcher on the recently saved file. Then, whenever that saved file is touched at all (by Komodo or an external program, in my case an rsync of the saved file to another file system), the source control defined diff-cmd is executed on a randomly chosen uncommitted file (but always the same one). I get 3 diff-tool launches during the Komodo file save operation, then 2 diff-tool launches during the external rsync operation. The filewatching behavior seems to have a limited duration. (After 15 or so seconds elapse, I can rsync the saved file without causing diff-tool launches).

dooleyk commented 6 years ago

FYI...

I had the same problem with my Subversion diff-cmd in my configuration file on my CentOS7 box, using... Komodo IDE, version 11.0.2, build 90813, platform linux-x86_64. Built on Mon Dec 4 10:20:45 2017.