Skip to main content
1-Visitor
September 22, 2016
Solved

Checkout Folder at certain Checkpoint

  • September 22, 2016
  • 1 reply
  • 2626 views

Hello everyone,

let's say I have the following PTC Project Structure:

A

|->SubfolderOfA

|-->SubSubfolderOfA

|-->AnotherSubSubfolderOfA

B

|->SubfolderOfB

Now "SubfolderOfA" has various Checkpoints, say v1.1, 1.2, 1.3, etc...

Now this is what I'd like to do, all of that <from the command line using si>:

> I'd like to checkout somewhere on my Filesystem (outside of any Sandbox) only "SubfolderOfA" (and all of it's child-Folders) and then switch between its various Checkpoints.

From what I could read in this forum, a build-sandbox could be a good starting point, like:

si createsandbox -P$MKS.pj --projectRevision=1.1

But, supposed the first step is right, how can i switch between the various Checkpoints of "SubfolderOfA"?

Thank you for your help!

Martino

    Best answer by kthierer

    I got the same error

    then I checked with

        si sandboxes

    if this really is true.

    This then brought me to the idea to try

    si retargetsandbox --projectRevision=1.2 c:\absolute\path\to\project.pj


    For me this seems to work.


    BTW: You could also try %cd%\project.pj if your current directory is the sandbox.


         Jürgen


    1 reply

    mgrullo1-VisitorAuthor
    1-Visitor
    September 25, 2016

    Hello, a little update from my side.

    I've executed the following commands:

    si createsandbox --projectRevision=1.1 .

    si retargetsandbox --projectRevision=1.2 .


    But the latter gives me the following error:

    Failed to retarget sandbox .: Retarget failed: The specified sandbox is not registered as a top level sandbox


    Same error with an additional argument:

    si retargetsandbox --projectRevision=1.2 project.pj


    Using the GUI I'm able to retarget the sandbox successfully: 'Sandbox'->'Retarget'


    So what am I doing wrong with the call to retargetsandbox?


    Thank you

    Martino

    kthierer12-AmethystAnswer
    12-Amethyst
    September 27, 2016

    I got the same error

    then I checked with

        si sandboxes

    if this really is true.

    This then brought me to the idea to try

    si retargetsandbox --projectRevision=1.2 c:\absolute\path\to\project.pj


    For me this seems to work.


    BTW: You could also try %cd%\project.pj if your current directory is the sandbox.


         Jürgen


    12-Amethyst
    September 27, 2016

    This brought me to the idea how to generate a more compact view of

    project differences (members only, no subprojects)

    si retargetsandbox --projectRevision=1.6 %cd%\project.pj

    si print --recurse > sb_1_6.txt

    si retargetsandbox %cd%\project.pj

    si print --recurse > sb_CURRENT.txt

    si difffiles --gui sb_1_6.txt sb_CURRENT.txt