* * *

Author Topic: Open project file in OS / shell and GIT Integration  (Read 2284 times)

lucamar

  • Jr. Member
  • **
  • Posts: 61
Re: Open project file in OS / shell and GIT Integration
« Reply #15 on: August 10, 2018, 12:09:39 pm »
Rather than a Git integration like that---which, incicentally, exceeds the limits of the post question---I would like to see generic plugin hooks for version control, maybe a la Delphi. Unless they are already there, of course ...  ;)

The problem is that you use Git, but I use SVN and others use Mercurial or Fossil or what-not. The IDE should be agnostic with respect to any one of those and instead try to catter generically to the concept.

IMHO, of course.  ;D
Been there, done that ... barely kept the project timelines. ;)

taazz

  • Hero Member
  • *****
  • Posts: 5257
Re: Open project file in OS / shell and GIT Integration
« Reply #16 on: August 10, 2018, 05:09:41 pm »
here goes this works for me on suse with KDE installed I have no idea how it fairs for other systems or in gnome.
1) Open the menu Tools\Configure External Tools
2) press the add button to add a new menu item
3) In the tile type Konsole.
4) in the Program filename type konsole be carefull with the letter case in this editor otherwise nothing will run.
5) in the parameters type --workdir $projPath()
6) uncheck the Hide main Form check box bellow the working directory editor.
7) press OK twice to save the item and exit the configuration dialog.

Ready, now you can find a new menu under the tools menu titled Konsole when you click it it will open the konsole terminal application in the projects path as long as the path does not have a space in its name if it does it will open one level up.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

tudi_x

  • Hero Member
  • *****
  • Posts: 520
Re: Open project file in OS / shell and GIT Integration
« Reply #17 on: August 10, 2018, 05:23:43 pm »
@lucamar
https://stackoverflow.com/questions/871/why-is-git-better-than-subversion#875
what can be easily observed is that most repos are migrating to Git. even Microsoft bought a Git based company.
Github, Gitlab, Bitbucket companies are Git based.
this is the trend right now and this trend is for many years now strongly eroding the user base of other systems.
decentralized solutions will win nowadays, just look at the number of blockchain projects not being actual currencies.

IMO the IDE should not be agnostic, the IDE should target so the invested time of team resources is used to make the biggest difference to the most users with the least amount of work.
Skilled users could always maintain very antic code base (sorry Lazarus repo) and have a plug in created as Lazarus code is open sourced.
« Last Edit: August 10, 2018, 05:27:11 pm by tudi_x »
Lazarus 1.8.4 64b on MX Linux "Horizon"

lucamar

  • Jr. Member
  • **
  • Posts: 61
Re: Open project file in OS / shell and GIT Integration
« Reply #18 on: August 10, 2018, 08:57:15 pm »
Skilled users could always [...] have a plug in created as Lazarus code is open sourced.

Let's avoid the "mine washes whiter" snips, OK? My point is that if Lazarus had specific hooks (or a generic API) for version control plugins, sooner or later there will appear more or less "standard" plugins for the most used version control systems. That's what is important, not whether GIT is the bestest and must be treated apecially.
Been there, done that ... barely kept the project timelines. ;)

tudi_x

  • Hero Member
  • *****
  • Posts: 520
Re: Open project file in OS / shell and GIT Integration
« Reply #19 on: August 11, 2018, 11:53:44 am »
@taazz
thank you for the steps. i do not have the checkbox mentioned in step 6.
i configured the external tool as xfce4-terminal but a terminal does not appear when clicking the new menu item.
xfce4-terminal opens a terminal on MX Linux - the terminal window below i opened with the command in the command window up.

OS and version as per my signature.
Lazarus 1.8.4 64b on MX Linux "Horizon"

taazz

  • Hero Member
  • *****
  • Posts: 5257
Re: Open project file in OS / shell and GIT Integration
« Reply #20 on: August 11, 2018, 01:20:24 pm »
@taazz
thank you for the steps. i do not have the checkbox mentioned in step 6.
i configured the external tool as xfce4-terminal but a terminal does not appear when clicking the new menu item.
xfce4-terminal opens a terminal on MX Linux - the terminal window below i opened with the command in the command window up.

OS and version as per my signature.
1) remove any and all parameters until a window is successfully opened.
2) in your terminal window type xfce4-terminal --help (or what ever the equivalent is for xfce4-terminal) to see a list of command line parameters and see if it uses --workdir or some other form.
3) test the parameter in the terminal window to make sure that it works as expected before jumping in the external tools settings.
4)I have no idea what is going on with 1.8.4 I recently installed 1.8.2 my self on windows and I'm sorry to say I'm not looking forward to finding more free space for yet an other lazarus installation. Sorry someone else will have to help with the specifics of lazarus 1.8.4.
« Last Edit: August 11, 2018, 01:22:43 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

sash

  • Jr. Member
  • **
  • Posts: 73
Re: Open project file in OS / shell and GIT Integration
« Reply #21 on: August 11, 2018, 10:32:32 pm »
For xfce use exo-open
Lazarus 1.8.4 Unversioned directory FPC 3.0.4 x86_64-linux-gtk2

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Open project file in OS / shell and GIT Integration
« Reply #22 on: August 12, 2018, 06:56:08 am »
On Ubuntu Mate its

Program Filename : mate-terminal
Parameters : --working-directory=$projPath()

And it works like a dream !

Personally, given how easy this is and given the complexity of (eg) git, I rather not see scarce developer time committed (if you forgive the pun) to implementing git as a GUI.

Davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

taazz

  • Hero Member
  • *****
  • Posts: 5257
Re: Open project file in OS / shell and GIT Integration
« Reply #23 on: August 12, 2018, 02:17:48 pm »
insignificant little changes just to make things annoying enough to keep linux outside of the main stream! Nive to have the differences in one place though thanks for the heads up everyone.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

sash

  • Jr. Member
  • **
  • Posts: 73
Re: Open project file in OS / shell and GIT Integration
« Reply #24 on: August 12, 2018, 02:28:15 pm »
Personally, given how easy this is and given the complexity of (eg) git, I rather not see scarce developer time committed (if you forgive the pun) to implementing git as a GUI.

I second this, and for all not very experienced users there is a lot of well working, free gui tools for any vcs, like Tortoise(SVN/Git/HG) and a bunch of similar.

Personally (being mostly a Mercurial user), I also use Netbeans IDE (for C/C++/PHP/HTML) which supports most of VCS, but despite this fact I find more convenient to use external application instead - TortoiseHG. Which is especially convenient when working with complex code that overlaps across languages and repos.
Lazarus 1.8.4 Unversioned directory FPC 3.0.4 x86_64-linux-gtk2

lucamar

  • Jr. Member
  • **
  • Posts: 61
Re: Open project file in OS / shell and GIT Integration
« Reply #25 on: August 12, 2018, 02:53:05 pm »
One more, for Kubuntu and other KDE-based distros:

Program Filename : konsole
Parameters : --working-dir $projPath()

One thing you can say for Linux: you're never out of options  :D

--
Oops! Just realized that Taazz explaination above is for konsole too
« Last Edit: August 12, 2018, 03:08:17 pm by lucamar »
Been there, done that ... barely kept the project timelines. ;)

af0815

  • Full Member
  • ***
  • Posts: 153
Re: Open project file in OS / shell and GIT Integration
« Reply #26 on: August 12, 2018, 03:55:55 pm »
... as part of the commands for committing to the git server the project i need access to command line. ...
I have found a component to integrate basics of svn and git in Lazarus https://gitlab.com/ccrdude/lazvcshelper
maybe this a soloution for the originally problem !?
regards
Andreas

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Open project file in OS / shell and GIT Integration
« Reply #27 on: August 13, 2018, 11:50:08 am »

Quote
Program Filename : konsole
Parameters : --working-dir $projPath()

Program Filename : mate-terminal
Parameters : --working-directory=$projPath()
.....
OK, opening a terminal is a good idea, sounds like some of this needs to find its  way to http://wiki.freepascal.org/IDE_tricks - I assume no one objects ?
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

dbannon

  • Sr. Member
  • ****
  • Posts: 292
Re: Open project file in OS / shell and GIT Integration
« Reply #28 on: August 16, 2018, 01:24:10 pm »

OK, opening a terminal is a good idea, sounds like some of this needs to find its  way to http://wiki.freepascal.org/IDE_tricks - I assume no one objects ?
[/quote]

Done

http://wiki.freepascal.org/IDE_tricks#Opening_a_Terminal_Windows_from_the_IDE
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus