Recent

Author Topic: VCS (Git, Subversion) IDE package  (Read 4107 times)

CCRDude

  • Hero Member
  • *****
  • Posts: 502
VCS (Git, Subversion) IDE package
« 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 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 :)

minesadorada

  • Hero Member
  • *****
  • Posts: 588
  • Retired
Re: VCS (Git, Subversion) IDE package
« Reply #1 on: March 27, 2017, 11:45:17 am »
Laz 1.7 54476M /fpc3.11 on Win v10 x64

Works great - thanks!
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

Basile-B

  • Sr. Member
  • ****
  • Posts: 457
Re: VCS (Git, Subversion) IDE package
« Reply #2 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).

CCRDude

  • Hero Member
  • *****
  • Posts: 502
Re: VCS (Git, Subversion) IDE package
« Reply #3 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 :)

Basile-B

  • Sr. Member
  • ****
  • Posts: 457
Re: VCS (Git, Subversion) IDE package
« Reply #4 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).

avra

  • Hero Member
  • *****
  • Posts: 1736
    • Additional info
Re: VCS (Git, Subversion) IDE package
« Reply #5 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 ;-)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

CCRDude

  • Hero Member
  • *****
  • Posts: 502
Re: VCS (Git, Subversion) IDE package
« Reply #6 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 :)

CCRDude

  • Hero Member
  • *****
  • Posts: 502
Re: VCS (Git, Subversion) IDE package
« Reply #7 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 :)

nouzi

  • Full Member
  • ***
  • Posts: 142
Re: VCS (Git, Subversion) IDE package
« Reply #8 on: August 16, 2019, 09:28:37 pm »
can't find git after install packag :'( :'(
my lazarus 2.0.4
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit

Thaddy

  • Hero Member
  • *****
  • Posts: 9293
Re: VCS (Git, Subversion) IDE package
« Reply #9 on: August 16, 2019, 09:36:49 pm »
You have to install git.
also related to equus asinus.

nouzi

  • Full Member
  • ***
  • Posts: 142
Re: VCS (Git, Subversion) IDE package
« Reply #10 on: August 16, 2019, 09:46:21 pm »
You have to install git.
yes i instaling git
« Last Edit: August 16, 2019, 10:36:41 pm by nouzi »
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit

nouzi

  • Full Member
  • ***
  • Posts: 142
Re: VCS (Git, Subversion) IDE package
« Reply #11 on: August 17, 2019, 12:57:11 am »
Same thing on the trunk
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit

nouzi

  • Full Member
  • ***
  • Posts: 142
(solved): VCS (Git, Subversion) IDE package
« Reply #12 on: August 17, 2019, 01:14:22 am »
solved after install TortoiseGit this packag  not based on git  :-[
« Last Edit: August 17, 2019, 01:16:04 am by nouzi »
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit

CCRDude

  • Hero Member
  • *****
  • Posts: 502
Re: VCS (Git, Subversion) IDE package
« Reply #13 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.

nouzi

  • Full Member
  • ***
  • Posts: 142
Re: VCS (Git, Subversion) IDE package
« Reply #14 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
my english is  bad
Lazarus 2.0 free pascal 3.0.4
Lazarus trunk  free pascal trunk 
System : windows 7 64bit