Toad World® Forums

Editor no longer prevents modification of Objects under Source Control

I have been testing Toad 12.8.0.49 and TFS 2015.

I have found that any Object that I open in the editor will allow me to make changes to the source without requiring that I first Check-Out the Object.

I have tested this with:

  • Functions
  • Packages (and Package Bodies)
  • Procedures
  • Triggers
  • Types (and Type Bodies)
  • Views
    This is a huge problem because it allows multiple developers to begin making changes to the same object before being Checked Out.

The Editor should prevent changes to object source if the object has not first been checked out by the logged on user. This was normal behavior in our previous version of Toad 12.1.0.22 (using a different source control provider).

In Toad 12.8.0.49, if Developer1 has an object checked out, Developer2 can open the same object and begin making changes to the source. When Developer2 attempts to compile (F9) the object, if the object is still checked out by Developer1, then Developer2 gets the warning that the object “is locked by another user. Team Coding prevented compilation.” Developer2 can’t save his/her changes to the object. This causes wasted time by Developer2 because changes should not have been allowed to begin with because the object was checked out by Developer1.

An even worse scenario is if when Developer2 attempts to compile (F9) the object, if Developer1 has checked-in changes to the object and the object is no longer checked out, then Toad gives Developer2 the warning that the object “needs to be checked-out before you compile. Do you want to check-out this object?” and if you choose to check-out the object, the Editor does not inform you of the differences that were added by Developer1. Developer2’s changes are now automatically compiled by Toad and when Developer2 checks in code, Developer1’s changes are lost because Toad allowed Developer2 to begin making changes without checking out the object first.

When Developer2 checked out the object, Toad didn’t inform of the differences made by Developer1.

Have I somehow missed some configuration setting that allows Editor changes to Objects under source control?
Has Toad been modified to allow this behavior on purpose and if so why, what benefit does it provide?
Or is this by accident and a huge bug?

Can I configure Toad to enforce check-out before allowing changes to objects in the Editor?

This appears to be related to the problem titled Views in Team Coding can be changed in editor (12.8.0.49) www.toadworld.com/…/26833

Hi Jeff,

First off, thanks for your feedback and questions! Team Coding was completely redesigned and rewritten for Toad 12.7 and later in order to make it simpler to configure and use. It’s always welcome to receive feedback from our users when new features are added or functionality is reworked.

As part of the Team Coding rewrite, a number of features were called into question in regards to their functional effectiveness. If memory serves, the first issue you raised was one of those features. In Toad 12.6 and prior, we ran into various random situations where Team Coding would incorrectly mark the Editor as read-only or read-write when it really should have been the opposite. This was especially true for certain version control providers that inconsistently or incorrectly marked the read-only flag for its working files. In addition, we also knew that there is really nothing preventing a user from making code changes to a controlled object by executing it outside of Toad in another tool (like SQL*Plus) which would cause Team Coding to then become out of sync. It was also possible that a user might want to do exactly what you’re describing (flesh out possible changes to a controlled object’s code without actually making those changes), which was not possible to do in Toad 12.6 and prior if the object name was specified. There may have been other reasons as well, but these are some of the ones I remember. As a result, a decision was made to not forcefully disable editing in the Editor, but simply catch the check-out state before the code is compiled to the database. At that point, if there are differences between the database version and the VCS version, and “Prompt user” is selected in the Team Coding Administration window for the “When differences in source versions exist” option, a dialog is displayed that notifies the user that there are differences and allows the user to select how (s)he would like to proceed.

Your second issue is a bit trickier. What you’re talking about here is the capability for recognizing “merge” changes, which is something that’s never existed in Team Coding before, but is something that’s on our radar. Since previous versions of Toad enforced the “lock-modify-unlock” method of versioning and didn’t allow editing of locked objects, the concept of merging was virtually unnecessary. However, there is now a reason to support that capability, so it is something we’re looking at.

To answer your questions:

Ø Have I somehow missed some configuration setting that allows Editor changes to Objects under source control?

No, the Editor no longer controls whether a controlled object can be edited. It will allow editing by default, and will prompt you to check out a controlled object when you compile it.

Ø Can I configure Toad to enforce check-out before allowing changes to objects in the Editor?

Yes, however this is a local preference in Team Coding so each user will need to enable this option in their local copy of Toad if they want to use it. If you go to the Team Coding configuration page, you’ll see an option that says, “Check-out object on opening” and “Check-in object on closing”. Enabling these options will automatically check the object out when it’s opened. That action should prevent others from making changes to an object’s source in the database and checking that object back in. It doesn’t restrict editing in the Editor, but it will notify other users that the object has already been checked out.

-John

From: jeff32768 [mailto:bounce-jeffreyblankenbiller2013@toadworld.com]

Sent: Monday, December 28, 2015 3:35 PM

To: toadoracle@toadworld.com

Subject: [Toad for Oracle - Discussion Forum] Editor no longer prevents modification of Objects under Source Control

Editor no longer prevents modification of Objects under Source Control

Thread created by jeff32768

I have been testing Toad 12.8.0.49 and TFS 2015.

I have found that any Object that I open in the editor will allow me to make changes to the source without requiring that I first Check-Out the Object.

I have tested this with:

  • Functions
  • Packages (and Package Bodies)
  • Procedures
  • Triggers
  • Types (and Type Bodies)
  • Views
    This is a huge problem because it allows multiple developers to begin making changes to the same object before being Checked Out.

The Editor should prevent changes to object source if the object has not first been checked out by the logged on user. This was normal behavior in our previous version of Toad 12.1.0.22 (using a different source control provider).

In Toad 12.8.0.49, if Developer1 has an object checked out, Developer2 can open the same object and begin making changes to the source. When Developer2 attempts to compile (F9) the object, if the object is still checked out by Developer1, then Developer2 gets the warning that the object "is locked by another user. Team Coding prevented compilation. " Developer2 can’t save his/her changes to the object. This causes wasted time by Developer2 because changes should not have been allowed to begin with because the object was checked out by Developer1.

An even worse scenario is if when Developer2 attempts to compile (F9) the object, if Developer1 has checked-in changes to the object and the object is no longer checked out, then Toad gives Developer2 the warning that the object "needs to be checked-out before you compile. Do you want to check-out this object? " and if you choose to check-out the object, the Editor does not inform you of the differences that were added by Developer1. Developer2’s changes are now automatically compiled by Toad and when Developer2 checks in code, Developer1’s changes are lost because Toad allowed Developer2 to begin making changes without checking out the object first.

When Developer2 checked out the object, Toad didn’t inform of the differences made by Developer1.

Have I somehow missed some configuration setting that allows Editor changes to Objects under source control?

Has Toad been modified to allow this behavior on purpose and if so why, what benefit does it provide?

Or is this by accident and a huge bug?

Can I configure Toad to enforce check-out before allowing changes to objects in the Editor?

This appears to be related to the problem titled Views in Team Coding can be changed in editor (12.8.0.49) www.toadworld.com/…/26833

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.

I will try the “Check-out object on opening” option.

However, I feel that this will cause objects to be checked-out on accident and to stay that way unless the “Check-in object on closing” option is also enabled (which we will probably not be enabling).

The SQL Editor appears to correctly track if an objects source has been modified since being opened. This IS_DIRTY tracking could be leveraged to add an option for “Check-out object on editing/changing”. I think that this would provide a better user experience than the other 2 options.

Another useful option would be “Undo check-out if closing without changes”.