1. Pete Yankovich
  2. PowerBuilder
  3. Friday, 24 January 2020 15:02 PM UTC

Is there an automated way to get latest from TFS for all objects in a target?  Maybe Orca Script?

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 18:38 PM UTC
  2. PowerBuilder
  3. # 1

Another option might be to use TF.EXE:

To get my collection "powerbuilder126" updated:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.EXE" workspaces /collection:http://r2-prod-03:8080/tfs/powerbuilder126
cd d:\_TFS\POWERBUILDER126
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.EXE" vc get /version:T WIN8DEV2 $/ /recursive /login:rsl\miguel,myPassword

 (WINDEV2 is the name of my PC and workspace).

(rsl\miguel is my domain user)

 

Bear in mind, that if there are Merge/Lock conflicts, a window will pop-up to ask you what to do.

This will only get the *.sr* files, so not fit do do a compile afterwards, since the pbl's remain unchanged if I'm not mistaken.

The other methods described by others are preferred. I only use this to do a backup.

 

HIH

Comment
There are no comments made yet.
Pete Yankovich Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 17:03 PM UTC
  2. PowerBuilder
  3. # 2

Could you be more specific with your response.  I have a 2017 R2 workspace with one target, no dot net or project file.

Comment
  1. Michael Kramer
  2. Friday, 24 January 2020 17:34 PM UTC
If you search a little in this community you will find Q&A few days ago (perhaps sometime last week) where someone asks for ORCAScript and receives ORCAScript samples in replies.

I believe there were several ORCA related Q&A since New Year so if one answer isn't complete search a little further back. I'm sure you will find working samples.
  1. Helpful
There are no comments made yet.
Michael Kramer Accepted Answer Pending Moderation
  1. Friday, 24 January 2020 15:50 PM UTC
  2. PowerBuilder
  3. # 3

Yes, You can use ORCAScript to do the Get Latest with full build (or 3PASS if needed).

I have sometimes written small PB utility apps like:

  • From Project .SRP file => generate ORCAScript.
    1 ORCAScript for each project object.
  • From Target .PBT file => Generate PowerShell script to manage workflow for multiple projects.
  • From Workspace .PBW file => Generate PowerShell script to manage workflow for multiple targets.
  • From Library .PBL file => Generate matching .PBG file.

NOTES on ORCAScript

  • Minimal documentation
  • Bug fixing is trial-and-error
  • Primitive scripting language lacking traditional "coding structures"
  • I prefer do minimal code in ORCAScript files (One file: Get-Latest; Another file: Deploy to .EXE)
  • Hence, any advanced processing, workflow management, and error handling => Use PowerShell !

Remember to TEST!
Minute mistakes in your ORCAScript file and the whole process falls apart.
Verify that when errors occur, it is obvious to you and/or other developers that process failed.


HTH /Michael

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.