GNOME Bugzilla – Bug 700919
CLI - Opening with Single File parameter fails silently
Last modified: 2017-12-13 19:04:00 UTC
I have a usecase where I launch a compare tool from a single file using a shell extension in windows like tortiseXXX tools. When a single file is used the my current compare tool will load with the one file loaded and prompt the users to add more files. This is very handy and something that I use very frequently. Is it possible to update Meld to accept a single file parameter and load the tool in the "New Comparison" dialog in "File Comparison" mode with the file name pre-loaded in the first file selector? FYI, Ultra compare can operate in this way and would like to switch my CM tools over to using Meld but I am held back because of this one feature. In a related note, the tool fails silently in Windows 2007 when a single parameter is passed. I all I see is a flash of a window and then nothing.
(In reply to comment #0) > I have a usecase where I launch a compare tool from a single file using a shell > extension in windows like tortiseXXX tools. When a single file is used the my > current compare tool will load with the one file loaded and prompt the users to > add more files. This is very handy and something that I use very frequently. > > Is it possible to update Meld to accept a single file parameter and load the > tool in the "New Comparison" dialog in "File Comparison" mode with the file > name pre-loaded in the first file selector? There isn't, no. I'm not likely to add this as it stands, but there are enough requests for command-line-option additions for other tools to use that I'm thinking about creating a second command-line tool with its own ABI for this. However, what you *can* do now is pass an empty filename as the second parameter, and Meld will open a two-way file comparison with the first file loaded and the second pane empty. This won't prompt users to add more files, but they can do so anyway fairly easily using the file selectors. > FYI, Ultra compare can operate in this way and would like to switch my CM tools > over to using Meld but I am held back because of this one feature. > > In a related note, the tool fails silently in Windows 2007 when a single > parameter is passed. I all I see is a flash of a window and then nothing. A single parameter is always treated as a VC comparison, so it's trying to launch a comparison on a single VC-controlled file. When you say that it fails silently, are you running from the command line?
Yes, any call via command line shell fails silently when the wrong parameters are passed. If there is a way for you to send a message to stdout in windohs for the correct CLI syntax, that would be more intuitive and consistent with other apps with CLI APIs. I am running on Windows 7 Enterprise x64. Your solution of the empty file works for me, I'll just have to pass through a program to generate a dummy file on the fly. Great program. It has saved me and my Team a ton of time and stress :)
Sorry for the delay. I'm guessing that the reason we fail silently is that we have no choice but to silence stdout/stderr when we're launched by pythonw.exe. Can you confirm that this is what is being used? If you use the normal python executable, I hope that you'll see error messages and that might help me figure out what the actual problem is.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/meld/issues/59.