perforcep4vperforce-stream

p4 paths import are not coming to workspace


If I type

p4 stream -o -v //path/to/My/stream

I could see the following items in Paths

Paths:
        share ...
        import+ Foo/proto/... //Depo1Path/api/api_main/...
        import+ Bar/proto/... //Depo2Path/SomeProjectname/proto/...

When I create a workspace with Helix Visual Client (P4V) of //path/to/My/stream both Foo/proto/ and Bar/proto/ are coming properly. But when I create workspace with p4 command from shell script, Foo/proto/ and Bar/proto/ are not coming to the workspace.

My script is given below

export P4CLIENT=$workspaceName
mkdir -p ${checkoutDir}
cd ${checkoutDir}
p4 client -i <<HERE
Client:     ${P4CLIENT}
Owner:      ${P4USER}
Root:       ${checkoutDir}
Options:    noallwrite noclobber nocompress unlocked nomodtime normdir
View:       
            ${depotPath}    //${P4CLIENT}/...
HERE
p4 sync -f

Can anybody point out what I'm doing wrong?


Solution

  • If you want a Stream client you must specify the Stream field and omit the View field.

    Assuming "depotPath" is your stream:

    p4 client -i <<HERE
    Client:     ${P4CLIENT}
    Owner:      ${P4USER}
    Root:       ${checkoutDir}
    Options:    noallwrite noclobber nocompress unlocked nomodtime normdir
    Stream:     ${depotPath}
    HERE