Hi
Inspired by Enrico plugin wishlist and svn diff plugin, I decided to write git (http://git.or.cz/) diff plugin.
Plugin should works the following way:
On button click (Any idea is it possible to make shortcut to plugin?):
1) If no diff output tab create *GIT-DIFF* tab and place diff there 2) If *GIT-DIFF* already exists, update it's content to latest diff and give focus to it
Well it almost works, exept few things:
1) if I click GITdiff button 2 times and try to close *GIT-DIFF* geany will crash. If I comment geany_data->sci->set_text line it won't crash, Any idea what I am doing wrong?
2) How can I make tab active after I click GITdiff button? One of idea was always close previous *GIT-DIFF* and open new document. But if I try to use documents->remove with index It close tab with my program I want do make diff to instead of *GIT-DIFF*
Best regards, Yura Semashko
On Nov 2, 2007 8:51 PM, Yura Siamashka yurand2@gmail.com wrote:
Inspired by Enrico plugin wishlist and svn diff plugin, I decided to write git (http://git.or.cz/) diff plugin.
Sounds cool.
If I comment geany_data->sci->set_text line it won't crash, Any idea what I am doing wrong?
Did you try running under gdb ?
How can I make tab active after I click GITdiff button?
I think it goes something like this:
GtkNotebook*book=geany_data->app->notebook; gint page=gtk_notebook_page_num(book, your_document->sci); gtk_notebook_set_current_page( book, page);
Good luck!
- Jeff
Hi
On Fri, Nov 02, 2007 at 09:34:25PM -0500, Jeff Pohlmeyer wrote:
If I comment geany_data->sci->set_text line it won't crash, Any idea what I am doing wrong?
Did you try running under gdb ?
The problem is avoided now. No more crashes ;-)
How can I make tab active after I click GITdiff button?
I think it goes something like this:
GtkNotebook*book=geany_data->app->notebook; gint page=gtk_notebook_page_num(book, your_document->sci); gtk_notebook_set_current_page( book, page);
Thanks that works.
Here is updated version of gitdiff. I had to add document_set_changed function to color tab as unmodified.
To geany devs: Can you commit plugin_add_set_text_changed_function.patch? Any chance to include gitdiff in geany?
Best regards, Yura Siamshka
On Sat, 3 Nov 2007 12:50:41 +0200, Yura Siamashka yurand2@gmail.com wrote:
Hi
Here is updated version of gitdiff. I had to add document_set_changed function to color tab as unmodified.
To geany devs: Can you commit plugin_add_set_text_changed_function.patch? Any chance to include gitdiff in geany?
I'll add the document_set_changed() to the API, no problem. I'm not sure we should include your plugin, maybe you can just make a tarball and put it on some webspace, similar to how Jeff has it done for his Lua plugin. Maybe, we'll add some autotools stuff to ease work with external plugins.
Btw, I like the idea of re-using the already created tab for a new diff on the same file. Maybe this should be ported to the svndiff plugin.
Regards, Enrico
Hi
On Sat, Nov 03, 2007 at 06:57:52PM +0100, Enrico Tröger wrote:
On Sat, 3 Nov 2007 12:50:41 +0200, Yura Siamashka yurand2@gmail.com wrote:
Here is updated version of gitdiff. I had to add document_set_changed function to color tab as unmodified.
To geany devs: Can you commit plugin_add_set_text_changed_function.patch? Any chance to include gitdiff in geany?
I'll add the document_set_changed() to the API, no problem.
Nice, thanks.
I'm not sure we should include your plugin, maybe you can just make a tarball and put it on some webspace, similar to how Jeff has it done for his Lua plugin. Maybe, we'll add some autotools stuff to ease work with external plugins.
I guess I will do that. git diff still need some works. (For example don't add anything to menu if you don't have git installed, gray button if you are not in git repositary)
Btw, I like the idea of re-using the already created tab for a new diff on the same file. Maybe this should be ported to the svndiff plugin.
Here is patch. It depend on plugin_add_set_text_changed_function.patch.
Best regards, Yura Semashko
On Sat, 3 Nov 2007 23:59:51 +0200, Yura Siamashka yurand2@gmail.com wrote:
Hi
On Sat, Nov 03, 2007 at 06:57:52PM +0100, Enrico Tröger wrote:
On Sat, 3 Nov 2007 12:50:41 +0200, Yura Siamashka yurand2@gmail.com wrote:
Here is updated version of gitdiff. I had to add document_set_changed function to color tab as unmodified.
To geany devs: Can you commit plugin_add_set_text_changed_function.patch? Any chance to include gitdiff in geany?
I'll add the document_set_changed() to the API, no problem.
Nice, thanks.
Done in SVn r2014.
I'm not sure we should include your plugin, maybe you can just make a tarball and put it on some webspace, similar to how Jeff has it done for his Lua plugin. Maybe, we'll add some autotools stuff to ease work with external plugins.
I guess I will do that. git diff still need some works. (For example don't add anything to menu if you don't have git installed, gray button if you are not in git repositary)
You should also use plugin_fields->flags = PLUGIN_IS_DOCUMENT_SENSITIVE; in init() to automatically disable the menu item if there are no open tabs.
Btw, I like the idea of re-using the already created tab for a new diff on the same file. Maybe this should be ported to the svndiff plugin.
Here is patch. It depend on plugin_add_set_text_changed_function.patch.
Well, I'll leave this to Frank. The plugin was written by him and he should decide whether to use it or not, thanks anyway.
Regards, Enrico
On Sun, 4 Nov 2007 11:13:00 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
Well, I'll leave this to Frank. The plugin was written by him and he should decide whether to use it or not, thanks anyway.
Regards, Enrico
Well, I would think that SVNdiff and GITdiff should have exactly the same options and behavior to provide a uniform look and feel.
It shouldn't matter wich technology is behind it all...
-H-
On 04/11/07 11:34:14, Harold Aling wrote:
On Sun, 4 Nov 2007 11:13:00 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
Well, I'll leave this to Frank. The plugin was written by him and
he
should decide whether to use it or not, thanks anyway.
Regards, Enrico
Well, I would think that SVNdiff and GITdiff should have exactly the same options and behavior to provide a uniform look and feel.
It shouldn't matter wich technology is behind it all...
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they want (or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
Regards, Nick
On Mon, 05 Nov 2007 12:01:05 +0000, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 04/11/07 11:34:14, Harold Aling wrote:
On Sun, 4 Nov 2007 11:13:00 +0100, Enrico Tröger enrico.troeger@uvena.de wrote:
Well, I'll leave this to Frank. The plugin was written by him and
he
should decide whether to use it or not, thanks anyway.
Regards, Enrico
Well, I would think that SVNdiff and GITdiff should have exactly the same options and behavior to provide a uniform look and feel.
It shouldn't matter wich technology is behind it all...
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they want (or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
That would be even better. Maybe Frank and Yura want to work together on this.
Regards, Enrico
Hi,
On Mon, 05 Nov 2007 12:01:05 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they want (or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
I like this idea very much. But I'd like to suggest to call it geanyVC and set up to goal for some 1.0 to support nearly complete functionality of the most popular version control systems svn, git and cvs. That includes add, revert, diff, commit, checkout... I know, it's a lot to do, but with a little help and time it should be possible ;). Maybe we could set up a new project at sf.net, so development of Geany will not be disturbed. What do you think about it?
Frank
It shouldn't matter wich technology is behind it all...
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they want (or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
I'm not so sure this is a very good idea and worth the effort. Although a lot of VC's share some stuff, they do have their specialities, apart from a different command line syntax.
I don't know which way the coders of those plugins want to take, but if they want to add further VC operations support apart from diff (checkout,commit spring to my mind) I imagine that things would get more complicated by putting everything under one hood instead of having a separate plugin for each VC.
Just my 2 cents Tim
Regards, Nick _______________________________________________ Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Mon, 05 Nov 2007 18:30:50 +0100, Tim Tassonis timtas@cubic.ch wrote:
It shouldn't matter wich technology is behind it all...
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they want (or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
I'm not so sure this is a very good idea and worth the effort. Although a lot of VC's share some stuff, they do have their specialities, apart from a different command line syntax.
I don't know which way the coders of those plugins want to take, but if they want to add further VC operations support apart from diff (checkout,commit spring to my mind) I imagine that things would get more complicated by putting everything under one hood instead of having a separate plugin for each VC.
Yes, it would be fine to have one diff plugin for some VCs or one plugin with more actions than only diff specialised for one VC. Supporting many operations(commit, add, update, diff, revert, checkout, ...) for many VCs would probably cause more effort than necessary.
Regards, Enrico
In future I think there should just be one plugin, say VCdiff for all common version control systems.
Food for thought: http://vci.everythingsolved.com/
- Jeff
On 05/11/07 17:46:14, Enrico Tröger wrote:
On Mon, 05 Nov 2007 18:30:50 +0100, Tim Tassonis timtas@cubic.ch wrote:
It shouldn't matter wich technology is behind it all...
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they
want
(or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
I'm not so sure this is a very good idea and worth the effort. Although a lot of VC's share some stuff, they do have their specialities, apart from a different command line syntax.
I don't know which way the coders of those plugins want to take,
but
if they want to add further VC operations support apart from diff (checkout,commit spring to my mind) I imagine that things would get more complicated by putting everything under one hood instead of having a separate plugin for each VC.
Yes, it would be fine to have one diff plugin for some VCs or one plugin with more actions than only diff specialised for one VC. Supporting many operations(commit, add, update, diff, revert, checkout, ...) for many VCs would probably cause more effort than necessary.
I thought that as Geany has diff filetype support a diff plugin makes sense with support for any VC system that has a simple 'vc diff path' style command.
As for the other actions, I'm not keen to see them really. But perhaps it could be done in a flexible way - just listing the commands and command names to run for each VC system: Add - $vcbin add $file Update - $vcbin up Revert - $vcbin revert $file
Commands more complex than this IMO might be best not supported - just use the CLI for commit, checkout.
That way there would be much less duplication of effort and feature requests for different VC support could be implemented much easier.
Regards, Nick
Hi
In future I think there should just be one plugin, say VCdiff for all common version control systems. The behaviour should be very similar, just with different command names, which could be stored in an array. Then the user just sets an option for the VC they want (or perhaps it could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
I like the idea. Here is the first version of this plugin. It supports SVN, CVS, GIT. Comments are welcomed.
Best regards, Yura Siamashka
On 06/11/07 23:30:36, Yura Siamashka wrote:
Hi
In future I think there should just be one plugin, say VCdiff for
all
common version control systems. The behaviour should be very
similar,
just with different command names, which could be stored in an
array.
Then the user just sets an option for the VC they want (or perhaps
it
could even be autodetected by looking for CVS/.svn/.hg/... subdirectories).
I like the idea. Here is the first version of this plugin. It supports SVN, CVS, GIT. Comments are welcomed.
Thanks for the plugin. We haven't really discussed what to do about this yet, but I'm interested in having a plugin like you've implemented.
I've just started making some changes to your patch (e.g. to fix NULL filenames and perhaps some refactoring), so I'll think more on this.
Regards, Nick
On Mon, 12 Nov 2007 13:04:15 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 06/11/07 23:30:36, Yura Siamashka wrote:
I like the idea. Here is the first version of this plugin. It supports SVN, CVS, GIT. Comments are welcomed.
[...] I've just started making some changes to your patch (e.g. to fix NULL filenames and perhaps some refactoring), so I'll think more on this.
The VC Diff plugin is now in SVN, thanks ;-)
I made some changes so that more information about each version control system is held in the VC_RECORD struct. If you have time, could you test that it still works as expected for GIT?
Also is it necessary to have a separate ENV for each command? Perhaps one ENV per VC system would be sufficient?
Regards, Nick
On Wed, Nov 14, 2007 at 04:53:19PM +0000, Nick Treleaven wrote:
I made some changes so that more information about each version control system is held in the VC_RECORD struct. If you have time, could you test that it still works as expected for GIT?
Works fine, thanks.
Also is it necessary to have a separate ENV for each command? Perhaps one ENV per VC system would be sufficient?
Perhaps.
Here is another little patch for this plugin. It adds check if project directory is actually VC dir. Also don't call find_cmd_env if doc->filename is NULL.
Best regards, Yura Siamashka
1c012f485cbc079c905d9cbd0cfb1b07@localhost 1194264065l.2158l.0l@nmt-pc.linuxdomain 20071106233036.GA28149@localhost 1194872655l.2158l.0l@nmt-pc.linuxdomain 20071114165319.c9be19da.nick.treleaven@btinternet.com Message-ID: ebc469a6fdf5f2486ace635ae7c40793@localhost X-Sender: h.aling@home.nl User-Agent: RoundCube Webmail/0.1-svn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit
On Wed, 14 Nov 2007 16:53:19 +0000, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Mon, 12 Nov 2007 13:04:15 +0000 Nick Treleaven nick.treleaven@btinternet.com wrote:
On 06/11/07 23:30:36, Yura Siamashka wrote:
I like the idea. Here is the first version of this plugin. It supports SVN, CVS, GIT. Comments are welcomed.
[...] I've just started making some changes to your patch (e.g. to fix NULL filenames and perhaps some refactoring), so I'll think more on this.
The VC Diff plugin is now in SVN, thanks ;-)
Maybe a stupid request: can the VCdiff plugin be renamed to 'Version Control actions' or something like that? VCdiff isn't very descriptive and if it will support revert or update in the future, 'diff' shouldn't be used...
-H-
On Nov 15, 2007 6:31 AM, Harold Aling h.aling@home.nl wrote:
Maybe a stupid request: can the VCdiff plugin be renamed to 'Version Control actions' or something like that? VCdiff isn't very descriptive and if it will support revert or update in the future, 'diff' shouldn't be used...
"VCdiff" sounds a little microsoft-ish to me...
- Jeff
Hi,
On Thu, 15 Nov 2007 13:22:27 -0600 "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
"VCdiff" sounds a little microsoft-ish to me...
I like the name ;D
Frank
On Thu, 15 Nov 2007 13:31:43 +0100 Harold Aling h.aling@home.nl wrote:
On Wed, 14 Nov 2007 16:53:19 +0000, Nick Treleaven nick.treleaven@btinternet.com wrote:
The VC Diff plugin is now in SVN, thanks ;-)
Maybe a stupid request: can the VCdiff plugin be renamed to 'Version Control actions' or something like that? VCdiff isn't very descriptive and if it will support revert or update in the future, 'diff' shouldn't be used...
If it will support further actions, I would say it should be renamed 'Version Control'.
Regards, Nick
On Nov 16, 2007 6:37 AM, Nick Treleaven nick.treleaven@btinternet.com wrote:
If it will support further actions, I would say it should be renamed 'Version Control'.
How about "VerCon" ?
- Jeff
On Nov 16, 2007 1:11 PM, Jeff Pohlmeyer yetanothergeek@gmail.com wrote:
On Nov 16, 2007 6:37 AM, Nick Treleaven nick.treleaven@btinternet.com wrote:
If it will support further actions, I would say it should be renamed 'Version Control'.
How about "VerCon" ?
After a little googling, "Version Control" might indeed be the least ambiguous:
http://www.faqs.org/rfcs/rfc3284.html http://www.vercon.sci.eg/Vercon_en/vercon.asp
- Jeff
Hi,
On Fri, 16 Nov 2007 13:28:26 -0600 "Jeff Pohlmeyer" yetanothergeek@gmail.com wrote:
On Nov 16, 2007 1:11 PM, Jeff Pohlmeyer yetanothergeek@gmail.com wrote:
On Nov 16, 2007 6:37 AM, Nick Treleaven nick.treleaven@btinternet.com wrote:
If it will support further actions, I would say it should be renamed 'Version Control'.
How about "VerCon" ?
After a little googling, "Version Control" might indeed be the least ambiguous:
http://www.faqs.org/rfcs/rfc3284.html http://www.vercon.sci.eg/Vercon_en/vercon.asp
Without reading much, I prefer VerCon as name of the plugin. But "Version Control" would be better as entry inside tools-menu ;)
Regards, Frank
Hi, Harold, hi list,
On Thu, 15 Nov 2007 13:31:43 +0100 Harold Aling h.aling@home.nl wrote:
Maybe a stupid request: can the VCdiff plugin be renamed to 'Version Control actions' or something like that? VCdiff isn't very descriptive and if it will support revert or update in the future, 'diff' shouldn't be used...
I think, it's hardly depending on what we want. I like to have a complete support for VC as plugin. That includes functions like diff (allready done), revert (also), commit, add, remove, status. Maybe some more. But mother of all questions is: Do we really want to have this as plugin distributed and developed inside geany svn. Does everyone need that functions or will it only blow up size of Geany. First I was sure about to don't add it. But now I'm getting the point, that you are also interested into a complete support of VCS. So what to do?
Regards, Frank
On Tue, 20 Nov 2007 12:20:26 +0100, Frank Lanitz linux@partysoke.de wrote:
Hi, Harold, hi list,
On Thu, 15 Nov 2007 13:31:43 +0100 Harold Aling h.aling@home.nl wrote:
Maybe a stupid request: can the VCdiff plugin be renamed to 'Version Control actions' or something like that? VCdiff isn't very descriptive and if it will support revert or update in the future, 'diff' shouldn't be used...
I think, it's hardly depending on what we want. I like to have a complete support for VC as plugin. That includes functions like diff (allready done), revert (also), commit, add, remove, status. Maybe some more. But mother of all questions is: Do we really want to have this as plugin distributed and developed inside geany svn. Does everyone need that functions or will it only blow up size of Geany. First I was sure about to don't add it. But now I'm getting the point, that you are also interested into a complete support of VCS. So what to do?
Regards, Frank
I surely would use this plugin too, but I think it does make sense to make this configurable at all. I don't know if it is possible yet to put plugins just somewhere in ~/.geany/?
Hi,
On Sat, 3 Nov 2007 23:59:51 +0200 Yura Siamashka yurand2@gmail.com wrote:
Btw, I like the idea of re-using the already created tab for a new diff on the same file. Maybe this should be ported to the svndiff plugin.
Here is patch. It depend on plugin_add_set_text_changed_function.patch.
Applied with svn r2018. Thank you very much ;)
Frank
On Sat, 3 Nov 2007 03:51:36 +0200, Yura Siamashka yurand2@gmail.com wrote:
Hi,
the code looks good (but I didn't test it, no git repo here).
On button click (Any idea is it possible to make shortcut to plugin?):
Not yet. This feature still has to be implemented.
Regards, Enrico
Hi
On Sat, Nov 03, 2007 at 06:55:35PM +0100, Enrico Tröger wrote:
the code looks good (but I didn't test it, no git repo here).
Here is I belive last version of this patch. At least I don't need anything else from it exept shortcut.
Changes: 1) it check if git is installed in system 2) run git diff in active file tab directory instead of working path.
If you find It is possible to include this in geany good, otherwise it will live here: http://users.cosmostv.by/yurand/geanygitdiff/
you can always create git repositary with the following commands
$ mkdir testrep $ cd testrep $ git init-db $ git config user.email "you@email.com" $ git config user.name "Your Name" $ echo foo > bar.txt $ git add bar.txt $ git commit -a -m "initial commit"
Best regards, Yura Siamashka