Toad World® Forums

toad team coding integration with git


#1

I am trying to integrate git with toad team coding and i am having issues

In Utilities>Team Coding>Configure Team Coding

I have checked Use Code Collections, Use Version Control System. I have installed Team Coding Objects in TOAD schema

I chose Git for VCS and have configured it(specified Git Client path).

When I click OK…it prompts me for Git Login

I specify GIT Repository and GIT user/email which are optional

When I click ok it prompts me “Code Collections are not set up. Would you like to set up now”?

When I click yes the add collection item window prompts up. This is where I have problems.

I dont see a VCS project for GIT. There is a window for select project that pops up. I cannot do any selection in this window and OK is greyed out without any selection.

How to select a VCS project. Is there a step-by-step guide to set this up. I had same issues with svn as well, I feel VCS project is needed to be set up some where. Please advice.

Thanks


#2

The attached document walks you through setting up Git with Toad. When using Git, Toad treats each directory / sub directory as Project. You need to set up
some directories with at least one item added to Git, before it will display in the Toad project dialog. The document covers how to do this. SVN works in a similar way. Each SVN directory / module is treated as a project.

Please let me know if this helps solve your issue.

Stephen

From: gsiddaganganna [mailto:bounce-gsiddaganganna@toadworld.com]

Sent: Tuesday, February 04, 2014 4:30 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] toad team coding integration with git

toad team coding integration with git

Thread created by gsiddaganganna

I am trying to integrate git with toad team coding and i am having issues

In Utilities>Team Coding>Configure Team Coding

I have checked Use Code Collections, Use Version Control System. I have installed Team Coding Objects in TOAD schema

I chose Git for VCS and have configured it(specified Git Client path).

When I click OK…it prompts me for Git Login

I specify GIT Repository and GIT user/email which are optional

When I click ok it prompts me “Code Collections are not set up. Would you like to set up now”?

When I click yes the add collection item window prompts up. This is where I have problems.

I dont see a VCS project for GIT. There is a window for select project that pops up. I cannot do any selection in this window and OK is greyed out without any selection.

How to select a VCS project. Is there a step-by-step guide to set this up. I had same issues with svn as well, I feel VCS project is needed to be set up some where. Please advice.

Thanks

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#3

Apparently, the Git Set up attachment did not upload from my email, due to a Toad World glitch. I will send the document to you, and update it here once the issue is resolved.


#4

Hi Stephen,

Thank you for the document. I appreciate it. I followed the steps and I am able to set up git and integrate toad with git… I am able to create different collections(views/functions/procedures etc) and was able to push the files from toad into VCS under respective folders (views/functions etc) within root. Right now I am encountering a strange problem. When I checkout the code from the schema browser, I am not able edit it, Also I dont see options to check back in.

Also I notice under Utilities > Team Coding, I see the following options greyed out: Add file, Check In, Undo Checkout. I believe these were working and not sure if I changed something for these to grey out. In essence I am not able to checkout code, make revisions and checkback in. Please let me know what could be the reason for this? If I have missed anything

Thanks…


#5

Hello,

There is clearly something we are missing. I am able to check in/ out from the Schema Browser in Team Coding using Git on my desktop. If you are using a remote
Git repository, perhaps you can try these steps with a repository on your local desktop.

These are the steps I followed. Perhaps something here will give us an ah-hah moment.

Set up Repository on my local desktop. Mine is in c:\Work\GitRepository

Create a folder for my project in c:\Work\GitRepository\Procedures

Add a text file to Git from the command line in the Procedures folder.

Connect to database in Toad. Install Team Coding , select Git as the provider and check the option Code Collections Option.

Set up a code collection. Mine is called ‘Procedures’ and I map to the Procedures project in Git. The collection is for a Schema called TKD_SCHOOL
and the object type is Procedures.

Open Schema Browser and navigate to a procedure in the TKD_SCHOOL schema. Right click on an object. The ‘Check out’ button is visible. Also notice
that the Team Coding Toolbar ‘Check out’ button is enabled. If you navigate the Utilities – Team Coding menu, the ‘Check out’ button is also enabled.

Check out the object. Double click to open the object in the Editor (stating the very obvious here) but sometimes I think I can edit the object DDL
in the Schema Browser right hand side window J)

Now the ‘Check in’ and ‘Undo Checkout’ menu items are visible in the Schema Browser menu. The Team Coding Toolbar and Utilities menu items are enabled
accordingly.

The Editor is enabled. Make a modification. Compile the object.

Check in the object. Done!

If you still have a problem, I would guess there is something awry with the Code Collection set up, but can’t be sure without more information.

Please let me know if this helps.

Stephen

From: gsiddaganganna [mailto:bounce-gsiddaganganna@toadworld.com]

Sent: Wednesday, February 05, 2014 1:25 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] toad team coding integration with git

RE: toad team coding integration with git

Reply by gsiddaganganna

Hi Stephen,

Thank you for the document. I appreciate it. I followed the steps and I am able to set up git and integrate toad with git… I am able to create different collections(views/functions/procedures
etc) and was able to push the files from toad into VCS under respective folders (views/functions etc) within root. Right now I am encountering a strange problem. When I checkout the code from the schema browser, I am not able edit it, Also I dont see options
to check back in.

Also I notice under Utilities > Team Coding, I see the following options greyed out: Add file, Check In, Undo Checkout. I believe these were working and not sure if I changed something for these
to grey out. In essence I am not able to checkout code, make revisions and checkback in. Please let me know what could be the reason for this? If I have missed anything

Thanks…

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#6

Thank you Stephen for the detailed steps. I am able to create a new repository and set up a collection. When I checked out again I was not able to see the check in options. Usually when an object is checked out, it should be editable while the object I am trying to check out, I cannot make any changes. It must have been something I have done. I created a brand new procedure. The new procedure I just created, I am able to check in, undo checkout options etc and am able to create new revisions. Not sure why I am not able to do the same with the objects previously there. Is there any lock in the VCS? Please let me know if you think of any reasons.

Thanks,


#7

Hello,

To the best of my knowledge, there is no lock in the VCS, as Git more or less has no concept of locking. You could test by opening a copy of the source file
in Notepad ++ or the Toad editor for that matter. If it is locked it should be readonly.

If you can create a new procedure, and Team Coding works correctly, then it seems like Team Coding is working. Can you post me a screen shot of your Code
Collections and the Team Coding configuration dialog. Maybe I can see something.

Stephen

From: gsiddaganganna [mailto:bounce-gsiddaganganna@toadworld.com]

Sent: Wednesday, February 05, 2014 3:43 PM

To: toadoracle@toadworld.com

Subject: RE: [Toad for Oracle - Discussion Forum] toad team coding integration with git

RE: toad team coding integration with git

Reply by gsiddaganganna

Thank you Stephen for the detailed steps. I am able to create a new repository and set up a collection. When I checked out again I was not able to see the check in options. Usually when an object
is checked out, it should be editable while the object I am trying to check out, I cannot make any changes. It must have been something I have done. I created a brand new procedure. The new procedure I just created, I am able to check in, undo checkout options
etc and am able to create new revisions. Not sure why I am not able to do the same with the objects previously there. Is there any lock in the VCS? Please let me know if you think of any reasons.

Thanks,

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - General
notifications altogether.

Toad for Oracle - Discussion Forum

Flag
this post as spam/abuse.


#8

Hello,

I’m starting with Git and I have configured GIT (like VCS) in one schema. This way every user who access this schema could change the objects at the same time.

But I want to make check-in/check-out object and lock it for the other users who access this schema like I used to do when I worked in TFS.

Is possible to configure Team coding to work with git? How could I do?

Thank you very much


#9

Team Coding does work with Git, however, there is no real locking concept in Git. Git is a distributed version control system.

Theoretically in Git, a person would make a local clone of the main trunk (or a different branch) before starting their work. That local clone then becomes that user’s branch and any changes are saved to the local cloned copy. User “A”'s changes don’t affect User “B” since both users operate within their own separate local branches. In fact, User “B” would have no idea that User “A” checked an object out. When the user is ready to check in, they would then manually merge their local cloned branch to the main trunk.

This is a slightly different workflow than using TFS. TFS is more of a client/server model where all users work either off the trunk or a branch located on the server. Changes are still made within a local “sandbox” on the user’s computer; however, when an item is checked out by User “A”, User “B” can see that User “A” checked out the object.

If you’re looking for a no-cost solution that works similarly to TFS, I would instead recommend checking out Subversion (SVN). While not the same as TFS, it behaves similar to TFS in many aspects. It also gives you the ability to decide whether to enable or disable locking when checking out objects. Team Coding also works with SVN as well.

-John


#10

Thank you for your answer, I understand git is a dcvs meanwhile tfs is more like a client/server mode, however i think it is lightly different with objects in oracle database because you have a unique database although repository is distributed.

This is how I think it works:

Using GIT with Team coding when you check out a function, modify, compile and then check in, these changes are automatically in the database although you have to make a commit to the git repository because you have your local branch.

Other uses couldn’t check out the same function until you do check in.Is this the way it works?

I’m interested in control the changes in the database because there are many developers in the same schema who could modify the objects. I could assume to do manually the commit to git repository if I could control simultaneous modifications.

Please correct me if I’m wrong.

Thank you

El mar, 17 de noviembre de 2015 16:08, John Bowman bounce-jbowman@toadworld.com escribió:

RE: toad team coding integration with git

Reply by John Bowman
Team Coding does work with Git, however, there is no real locking concept in Git. Git is a distributed version control system.

Theoretically in Git, a person would make a local clone of the main trunk (or a different branch) before starting their work. That local clone then becomes that user’s branch and any changes are saved to the local cloned copy. User “A”'s changes don’t affect User “B” since both users operate within their own separate local branches. In fact, User “B” would have no idea that User “A” checked an object out. When the user is ready to check in, they would then manually merge their local cloned branch to the main trunk.

This is a slightly different workflow than using TFS. TFS is more of a client/server model where all users work either off the trunk or a branch located on the server. Changes are still made within a local “sandbox” on the user’s computer; however, when an item is checked out by User “A”, User “B” can see that User “A” checked out the object.

If you’re looking for a no-cost solution that works similarly to TFS, I would instead recommend checking out Subversion (SVN). While not the same as TFS, it behaves similar to TFS in many aspects. It also gives you the ability to decide whether to enable or disable locking when checking out objects. Team Coding also works with SVN as well.

-John

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - General notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.


#11

Not a problem at all… :slight_smile: You are correct. From a database standpoint, Toad’s Team Coding should behave consistently regardless of the version control provider you use. So if User “A” checks out a database object, Team Coding should report that the object is “locked in Team Coding” within User “B”'s Toad application even if Toad can’t determine if it’s been checked out in the version control provider.

However as you mentioned, in a distributed version control environment, this presents a potential drawback. Once User “A” compiles the database object and checks it in, the object lock is released for future editing within Team Coding; however, the user’s local branch may not have been checked into the main trunk, so User “B” may not yet have the updated source in their local cloned branch. As a result, when User “B” opens up the object, depending on the Team Coding options chosen, Toad may prompt them that the database and VCS versions are now out of sync and provide them the option of overwriting User “A”'s changes if they’re not careful.

Team Coding’s database object control always operates in a centralized fashion, even if the version control operates in a distributed fashion.

-John


#12

You’re rigth

Thank you very much for your explanation.

El 17/11/2015 18:20, “John Bowman” bounce-jbowman@toadworld.com escribió:

RE: toad team coding integration with git

Reply by John Bowman
Not a problem at all… :slight_smile: You are correct. From a database standpoint, Toad’s Team Coding should behave consistently regardless of the version control provider you use. So if User “A” checks out a database object, Team Coding should report that the object is “locked in Team Coding” within User “B”'s Toad application even if Toad can’t determine if it’s been checked out in the version control provider.

However as you mentioned, in a distributed version control environment, this presents a potential drawback. Once User “A” compiles the database object and checks it in, the object lock is released for future editing within Team Coding; however, the user’s local branch may not have been checked into the main trunk, so User “B” may not yet have the updated source in their local cloned branch. As a result, when User “B” opens up the object, depending on the Team Coding options chosen, Toad may prompt them that the database and VCS versions are now out of sync and provide them the option of overwriting User “A”'s changes if they’re not careful.

Team Coding’s database object control always operates in a centralized fashion, even if the version control operates in a distributed fashion.

-John

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - General notifications altogether.

Toad for Oracle - Discussion Forum

Flag this post as spam/abuse.


#13

Just a few thoughts from another point of view … If I would have to setup database code development with a team, using a DVCS such as git, then every developer would be given its own strictly personal database instance. That database would be fed from whatever git branch the developer wants to work on. Changes made in the database would be exported and committed to that branch (only). I.o.w. eventually the database content would be fully in sync with the VCS branch. And never ever locking. The only caveat is that the developer should not forget to export the db changes and commit them. But that is true for any development environment.


#14

True, that would be a way to accomplish a distributed-like Team Coding environment; however, I think the poster was originally trying to make sure that the database objects would be locked even if he was using a distributed version control system. He wanted it to behave similar to the way TFS did when he used that.

If someone wanted to set up that kind of environment, however, I agree that functionally they should be able to do it; however, there are a few potential issues I can think of off the top of my head that the customer might need to take into consideration:

  1. It would require additional resources for the duplicate database instances, whether setting up instance caging, pluggable databases, or using VM’s. For small development teams, this may not be an issue; however, if the development team were large enough, this could potentially be a limiting factor. And if the instance were local to the developer’s machine, database size could be a factor.

  2. The Team Coding installation, itself, would need to be replicated exactly to every instance so the Team Coding configuration is consistent.

  3. You would lose any Team Coding history tracking since each database instance would essentially be destroyed after the work on the separate branch where complete, and a new instance created before a new DVCS branch is created and work started.

  4. You would need to create additional manual processes to synchronize the database updates between the individual branch instances and the “trunk” database instance (as Andre mentioned above)

  5. You could have changes made by User “B” in his/her database branch that are merged to the trunk database and could affect User “A”'s development. Unless User “A” makes sure his/her local database instance is manually updated from the trunk’s database code, this could affect the functionality of User “A”'s changes.

I only throw these out there as potential “items to think about” in case someone wants to attempt to configure this kind of environment. While it should functionally work, it does circumvent the conceptual design of Team Coding, so I suspect it might not be an officially supported configuration.

-John