Toad World® Forums

TeamCoding: Changed logics for recognizing checked-out objects?

Hello,

it seems that since 12.8 (we use this actually) and 12.10 (same behaviour in 12.11 beta) the logic for recognizing checked out objects has changed a bit.

I wrote a new procedure in Editor and pressed F9 to compile it. The results in TeamCoding tables are different.

Reaction in both Toad versions:

  1. Pop-up with Message “object needs to be checked out before compile”. I press OK.
  2. Pop-up for “Add to VCS”. I press OK.
  3. Pop-up for “Check out”. I press OK.

In the table TCX_OBJECT_HISTORY are now two transactions for each procedure. One for add and one for check out. The rows for check out differ in the field COMPLETED and VCS_REVISION. In 12.8 there is a “N” and in 12.10 there is a “Y” in column COMPLETED. In 12.8 the check out transaction is marked as completed when check in was performed successfully. The use of correct check out VCS version is great. All user fields (in OBECTS and OBJECT_HISTORY) are filled with UPPARCASE names except OS_USER here the names are now lowercase. Is this a wanted change or just forgot an UPPER()?

What is my Intention to post this and what do I want to ask?

We are generating a svn script every morning that does two things:

  1. Do an update on the working copy for a single user and
  2. lock (with force) alle objects marked as checked out in TeamCoding for this user.

This script is executed when a user starts his desktop. This is a workaroung for problems with svn that forced us to renew our working copies several times what had the bad effect that toad could not release locks during check in when the check out was done in an other working copy. This script just gets the locks to the correct working copy and TeamCoding works well.

With the changes in filling of TCX_OBJECT_HISTORY our generator does not recognize all required objects.

The following query is used to find checkd out objects for an user.

SELECT … – Build SVN command for each object
FROM TOAD.TCX_OBJECTS TCO
JOIN TOAD.TCX_OBJECT_HISTORY TOH ON TOH.OBJECT_ID = TCO.OBJECT_ID
WHERE TCO.NUMBER_OF_LOCKS > 0
AND TCO.LAST_CHECKOUT_VCSUSER = UPPER(username)
AND TOH.VCS_USER = UPPER(username)
AND TOH.COMPLETED = ‘N’

Is it safe for the future omitting the COMPLETED column? Is there a better way to select all checked out objects for a specific user?

Would this be enough?

FROM TOAD.TCX_OBJECTS TCO
WHERE TCO.NUMBER_OF_LOCKS > 0
AND TCO.LAST_CHECKOUT_VCSUSER = UPPER(i_ben_kuerzel)

Best regards

Dennis

Hey Dennis,

It should be safe to omit the COMPLETED column in your query, yes. As long as you include the TCO.NUMBER_OF_LOCKS to be greater than 0, as well as the TCO.LAST_CHECKOUT_VCSUSER, you should catch all objects checked out by a given user in Team Coding.

-John

Thank you,

now I can leave of the whole join on history table. This script was the last point that stood between me and the internal verification of 12.10. It will be roled out for all our devs in the next days. I am looking forward to 12.11 :slight_smile:

Best regards

Dennis