Lazarus

Using the Lazarus IDE => General => Topic started by: CCRDude on March 27, 2017, 09:50:10 am

Title: VCS (Git, Subversion) IDE package
Post by: CCRDude on March 27, 2017, 09:50:10 am
Hi,

I wanted to share an IDE plugin I wrote some months ago, and extended once or twice meanwhile, that helps me save a lot of time in my daily workflow.

LazVCSHelper (https://gitlab.com/ccrdude/lazvcshelper)

LazVCSHelper is a simple wrapper for an existing TortoiseGit (and now TortoiseSVN) installation, allowing me to easily commit and push code changes, or revert files, by detecting a Tortoise installation and calling it's dialogs. It goes as far as automatically opening the commit dialog upon closing a project.

Credits go to the great Lazarus IDE and the great Tortoise tools, this is really just a time-saving wrapper as you can see by the few code lines :) Comments about missing Git features or about bugs welcome of course :)
Title: Re: VCS (Git, Subversion) IDE package
Post by: minesadorada on March 27, 2017, 11:45:17 am
Laz 1.7 54476M /fpc3.11 on Win v10 x64

Works great - thanks!
Title: Re: VCS (Git, Subversion) IDE package
Post by: guest58172 on March 27, 2017, 12:19:03 pm
Currently I use an IDE tool to launch git gui. One important concept of git is the staging area which should be used to add or not modifications and not only a full file (you can select blocks of lines or single lines among the modifs). Seems quite useless without an UI for this phase.

A while back I've translated libgit2 bindings (planned to use them in Coedit) but never done anything. If anyone wants to write a better tool I still have it (it was based on GitForDelphi).
Title: Re: VCS (Git, Subversion) IDE package
Post by: CCRDude on March 27, 2017, 12:56:38 pm
File-based TortoiseGit supports this, by simply allowing to untick files in the commit dialog to exclude them from the commit.

I haven't yet used (nor known about to be honest) about selected-lines-only commits. I guess that depends on how granular you work. For me, I would avoid the risk to commit incomplete stuff or break things when manually selecting lines.

TortoiseGit support the staging area, so I wouldn't call this useless. It seems it does not support line-based commits, and if you depend on that, I have to admit it would be useless to you :)
Title: Re: VCS (Git, Subversion) IDE package
Post by: guest58172 on March 27, 2017, 01:17:59 pm
To test in git gui just right click in the diff there's "index lines", "index section". It allows, let's say, to program during several hours. After the session you decide what's ready or not and what has to go together or not (very useful the day a regression happens, it's important not to blend things in order to bisect and find easily the culprit).
Title: Re: VCS (Git, Subversion) IDE package
Post by: avra on March 02, 2019, 12:55:37 am
lazvcshelper does not compile on 32-bit Lazarus 2.0 fixes with either FPC 3.0 fixes or FPC 3.2 fixes. Tested on Win10x64.

To fix that you need to add IDEOptEditorIntf to uses in these units: VCSHelper.Menu, VCSHelper.Settings.Frame.Bazaar, VCSHelper.Settings.Frame.Git, VCSHelper.Settings.Frame.Mercurial, and VCSHelper.Settings.Frame.Subversion.

Could you please apply this fix to your repo?

It would be also nice to see lazvcshelper in OPM ;-)
Title: Re: VCS (Git, Subversion) IDE package
Post by: CCRDude on March 05, 2019, 09:30:22 am
I'm in the middle of moving right now, will of course update it as soon as I'm back behind my desk :)
Title: Re: VCS (Git, Subversion) IDE package
Post by: CCRDude on March 25, 2019, 12:06:14 pm
Just checked the code and have seen that I did add it in September already, just didn't push to Gitlab, only to local gitlab server. Pushed now :)
Title: Re: VCS (Git, Subversion) IDE package
Post by: nouzi on August 16, 2019, 09:28:37 pm
can't find git after install packag :'( :'(
my lazarus 2.0.4
Title: Re: VCS (Git, Subversion) IDE package
Post by: Thaddy on August 16, 2019, 09:36:49 pm
You have to install git.
Title: Re: VCS (Git, Subversion) IDE package
Post by: nouzi on August 16, 2019, 09:46:21 pm
You have to install git.
yes i instaling git
Title: Re: VCS (Git, Subversion) IDE package
Post by: nouzi on August 17, 2019, 12:57:11 am
Same thing on the trunk
Title: (solved): VCS (Git, Subversion) IDE package
Post by: nouzi on August 17, 2019, 01:14:22 am
solved after install TortoiseGit this packag  not based on git  :-[
Title: Re: VCS (Git, Subversion) IDE package
Post by: CCRDude on August 17, 2019, 12:18:42 pm
Indeed, please see the description above:

„LazVCSHelper is a simple wrapper for an existing TortoiseGit“

Why re-invent the GUI if a great one exists?

TortoiseGit does not support all features (partial commits missing), so I might check using git directly at some point. But copying all the Tortoise features is beyond my time available for this I‘m afraid.
Title: Re: VCS (Git, Subversion) IDE package
Post by: nouzi on August 17, 2019, 02:21:40 pm

„LazVCSHelper is a simple wrapper for an existing TortoiseGit“

Why re-invent the GUI if a great one exists?

1-Yes you can use git GUI Beside TortoiseGit
2- Why didn't you pay the package to OPM
3-thank you for all work and time
TinyPortal © 2005-2018