1. David Peace (Powersoft)
  2. PowerBuilder
  3. Monday, 13 January 2020 10:51 AM UTC

Hi Guys

I've build a script to get the latest sources from Source Control via ORCA Script, this is not getting the latest versions and I cannot see why.

My script is below:

start session
scc get connect properties PBWPath
scc connect
scc get latest version PBRPath
scc set target PBTPATH "outofdate"
scc refresh target "full"

build application full
build EXECUTABLE PBEXEPath ICONPath PBRPath LIBFlags
scc close
end session

Specifically the refresh target "full" is doing nothing, I originally hade "incremental" and that did not work either.

Below is the output when running the script:

Appeon (R) OrcaScript interpreter version 17.2
    Using ANSI source file C:\Workspaces\PowerBuilder\pb2017r3\pbbuild.txt.
Start Session
scc get connect properties "C:\Workspaces\PowerBuilder\pb2017r3\powersoft\psproducts.pbw"
scc connect
scc get latest version
   C:\Workspaces\PowerBuilder\pb2017r3\powersoft\pssupport.pbr
scc set target  "C:\Workspaces\PowerBuilder\pb2017r3\powersoft\PSProjects\pssupport\main\pssupport.pbt" "OUTOFDATE"
Lib List for SccTarget
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\ancestors\ancestors.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\dropdowns\dropdowns.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\mail\mail.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\systray\systray.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\spellcheck\spellcheck.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\invoice\invoice.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\releasetext\releasetext.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\shared\shared\shared.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\shared\security\security.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\shared\tsreports\tsreports.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\shared\winsock\winsock10.pbl
     c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\reportviewer_dw\reportviewer_dw.pbl
scc refresh target full
Build Application "Full"
    Creating compilation list...
    Creating c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl(dw_emp_list.srd)...
    Creating c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl(d_srn_text.srd)...
    Creating c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl(d_srn_text2.srd)...
    Creating c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl(d_srn_timesheets.srd)...
    Creating c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl(d_status_codes.srd)...
    Creating c:\workspaces\powerbuilder\pb2017r3\powersoft\psprojects\pssupport\main\main.pbl(d_status_history.srd)...

 

 

As you can see there is no output from the scc refresh target full......

Any thoughts or pointing out the obvious mistake all welcome.

Thanks

David

Accepted Answer
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Thursday, 16 January 2020 13:34 PM UTC
  2. PowerBuilder
  3. # Permalink

Ladies & Gentlemen

I have resolved my problem, thank you for Appeon Support & You all for your help. Ironically I stumbled across the problem by pure chance when investigating another problem. It's worth explaining what the problem was and how it was caused for other people to avoid.

The problem:

We had no .PBG files in our source control projects. The source control projects were brand new for the PB2017R3 migration source so that was odd in the first place.

The Cause:

The lack of .PBG files in source control was caused by existing PBG files on disk as "read only". These were copied with the source PBLs from the PB12.5 source before migration to PB2017R3. Adding objects to Source Control with "read only" PBG file on disk and no related PBG file on Source Control did not update the PBG on disk nor did it add the PBG to source control (I guess because it had not changed).

This mean that when another machine did a get latest it had no PBG files in source control to find a list of objects to compare. The odd thing was that the IDE saw changed objects but obviously no new objects, whereas ORCA did not see any changes.

The fix:

I ended up having to delete all the source from source control, delete the PBG files on disk and then do an add to source control from the PB IDE in order to regenerate the correct PBG files. This was the simplest way to be sure it was all correct. I'm sure I could have spent time regenerating the PBG files another way but as I had 134 of them to do I figured this was the fastest.

Suggestion:

I have suggested to Appeon that in the event that there is no PBG file in source control that the PBG on disk is removed and regenerated, then added to source control to rectify this problem. As a minimum an error could be given.

 

Comment
  1. Michael Kramer
  2. Thursday, 16 January 2020 16:08 PM UTC
Hey David, thanks for sharing your solution. You will most probably not be the last to experience this scenario.
  1. Helpful
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Monday, 13 January 2020 17:29 PM UTC
  2. PowerBuilder
  3. # 1

OK

I gues by the fact that this is tumble weed...... noone has any suggestions. I'll raise a support ticket with Appeon support.

Cheers

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Monday, 13 January 2020 21:08 PM UTC
  2. PowerBuilder
  3. # 2

>>scc set target PBTPATH "outofdate"

i do refresh all.  Of course i also have my pbls empty: 

scc set target "my.pbt" "refresh_all"

scc refresh target full

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 14 January 2020 09:24 AM UTC
I tried the refresh_all option, but that did not work either. My PBLs are not empty as really I'm only looking to get latest on the items that have changed.
  1. Helpful
There are no comments made yet.
Sarath Pappireddy Accepted Answer Pending Moderation
  1. Monday, 13 January 2020 21:26 PM UTC
  2. PowerBuilder
  3. # 3

Try Giving below instead of  full for refresh. Full may not be working.

scc refresh target 3pass

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 14 January 2020 09:25 AM UTC
I'll give that a go, I'm currently running with debug for Appeon support.
  1. Helpful
  1. David Peace (Powersoft)
  2. Tuesday, 14 January 2020 09:34 AM UTC
Sadly 3PASS made no difference. Must be something envirnmental but I cannot see it.....

  1. Helpful
  1. mike S
  2. Tuesday, 14 January 2020 14:14 PM UTC
3pass has nothing to do with getting the latest version; just compiling/regen it.
  1. Helpful
There are no comments made yet.
Sarath Pappireddy Accepted Answer Pending Moderation
  1. Tuesday, 14 January 2020 12:38 PM UTC
  2. PowerBuilder
  3. # 4

We have script like this and working fine. Please check this once.

start session
set debug true
scc set connect property localprojpath "C:\Test\PBLs"
;localprojpath must point to the parent directory of ws_objects folder
scc connect offline
scc set target "test.pbt" "importonly outofdate"
;scc refresh target incremental
scc refresh target 3pass
scc close
end session

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Tuesday, 14 January 2020 14:25 PM UTC
  2. PowerBuilder
  3. # 5

what source control?

It may be a path issue, or your source control.

 

also: 'no output from the scc refresh target full.'

I don't get output from the scc refresh target command either

Comment
  1. David Peace (Powersoft)
  2. Tuesday, 14 January 2020 15:32 PM UTC
the scc is MS SourceSafe

Regarding the output as I have never seen it work I was not sure...
  1. Helpful
  1. mike S
  2. Tuesday, 14 January 2020 16:26 PM UTC
probably your path. i assume you have a directory for each pbl?

does sourcesafe have an option of getting your source files directly?



i can see it create all my SR* files from my SCC (wizsource), which is a lot easier since i delete everything out of those directories and create empty pbls.



  1. Helpful
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.