On Mon, 18 Feb 2008 18:35:19 +0100, "Pierre Joye" pierre.php@gmail.com wrote:
Hi Enrico,
On Feb 18, 2008 6:18 PM, Enrico Tröger enrico.troeger@uvena.de wrote:
On Mon, 18 Feb 2008 16:45:46 +0100, "Pierre Joye" pierre.php@gmail.com wrote:
Hi,
Here is a first draft version of VCDiff windows support. It behaves
Cool, looks fine. There seems to be a little problem with the "Diff from current file" action: it seems it generates always a diff from the directory of the current file instead of the current file itself.
I don't understand what you mean, the two "current file"s confuse me :)
Sorry, I should read what I'm writing before hitting the send button :D. Steps to reproduce: - Geany working copy, only plugins/vcdiff.c is modified, all other files are unmodified from SVN - start Geany and open the file ChangeLog from this working copy - then Tools->VCdiff->From Current File - instead of reporting "No changes were made", it shows the changes from plugins/vcdiff.c
If more files are changed, these diffs are also shown. So, I guess passing the file argument to the svn command line seems to be broken.
I didn't do much testing but I guess it's only a small error.
It uses its own spawn functions based on CreateProcess and CreatePipe. Ideally we may create a common wrapper for all platform specific spawn (until glib works correctly). It is not yet complete as I was not sure
Yes, this would be a good idea and especially to save duplicate code because we need your code in Geany, in the vcdiff plugin and Frank and Yura probably want to use it also in their GeanyVC plugin. Not to mention any other plugins which want to execute some programs on Windows. Maybe we should put your code into src/win32.c. And we create a wrapper function for g_spawn_sync() and g_spawn_async() which just call these functions on non-Windows systems, else the Win32 specific versions. Could you also create a geany_w32_spawn_async()?
I first tried to do that but win32 functions are not exported and thus not callable by plugins. It will require a dllexport first (and probably some def files too). However I agree, the win32 function fits
Why? I was talking about to add your code simply to Geany's core code. There we create the wrapper functions, maybe utils_spawn_sync() and utils_spawn_async(). Within these wrappers depending on the operating system at compile time, your code (on Windows) or the GLib implementations (on non-Windows platforms) are called. All this happens inside Geany. Then we add these wrapper functions to the plugin API just like any other function in Geany. So, plugins don't know anything about all the different handling, they just use Geany's utils_spawn_sync() and the correct code is executed by Geany.
Regards, Enrico