This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PVCS - 8.5 - PCLI Get in issue on some files

Hi Dears !

Facing a strange issue when getting files from pvcs by using pcli commandline.

We are getting  ~550 files from pvcs server to local folders without issue, except for  ~10 of this.

Running pcli against a  export list file generated to drive the action by statements like 100100

set PCLI_PR=\\pvcs\sourcecode
Get -nb -nm -pp/abc/example/pss_cas/ -z -w -o -ad:\work\abc\example\pss_cas\ /abc/example/pss_cas/*.sr?

We expect to retrieve locally any *.sr file.

That's working like a charm except some weird bahaviour on some files/repositories and we just didn't find why.

Any statement is build on the same way, but as result, we sometimes observ that pcli seems to not take in charge the complete statement and "skip" the end of destination folder/file path.

Resulting in a try to create a folder instead of the expected *.sr files : this is not working at all and the folder is not created neither the sr files received.

The output give this information : 

...

D:\work\example\pss\pss_sys_grt\n_sys_grt_rtg.sru <- /example/pss/pss_sys_grt/n_sys_grt_rtg.sru Fetched revision 1.9.
D:\work\example\pss\pss_sys_grt\n_sys_grt.sru <- /example/pss/pss_sys_grt/n_sys_grt.sru Fetched revision 1.9.
D:\work\example\pss\pss_cas <- /example/pss/pss_cas/d_get_list.srd Fetched revision 1.14.
D:\work\example\pss\pss_sys_list_ras\d_get_list_das.srd <- /example/pss/pss_sys_list_ras/d_get_list_das.srd Fetched revision 1.11.
D:\work\example\pss\pss_sys_list_ras\d_get_list_ras.srd <- /example/pss/pss_sys_list_ras/d_get_list_ras.srd Fetched revision 1.13.

...

As you can see on line 3, the object name is not present, like not read by pcli, while initial Get statement is absolutely aligned with all the others (the pcli export file is automatically build and more than 500 others statements are running fine... ).

Did one of you already encounter a such issue ?

Could you share any experience about his ?

Thanks by advance !

Laurent.

  • Verified Answer

    +1  

    Hello Laurent,

    PCLI Get has the ability to fetch a single file to a destination with a different name (foo.txt -> bar.txt), and you are seeing that feature kick in on projects where only 1 file matches.

    To avoid this, use the BasePath (-bp) option to describes how the destination directory relates to a place in the project structure. More information on this option can be found in KB doc:

    http://knowledgebase.serena.com/InfoCenter/index?page=content&id=S123915

    Try the following:

    Get -nb -nm -w -o -ad:\work -bp/ /abc/example/pss_cas/*.sr?

    Explanation of changes:

    • Removed ProjectPath (-pp) as this option is not needed when you specify fully qualified entity paths as the final argument(s) (/abc/...)
    • Removed recursive (-z) option because recursive get with a wildcard (*.sr?) likely doesn't work the way you imagine: it will recursively fetch any file, regardless of name, if there is a project matching the wildcard (e.g. /abc/example/pss_cas/whoops.src/any/subdir/test.txt).
    • Changed the workfile directory (-a) to just the root that should contain the project structure.
    • Set BasePath (-bp) to /, indicating the workfile directory (-a) represents the root of the project database, and any project structure (/anc/example/pss_cas) should be created underneath.

    I hope this helps :-)

    Kind regards,

    - Richard.

  • 0 in reply to   

    Hi Richard,

    That's a great help ! 

    Working on legacy code, I didn't even "think to rethink".

    The process is now running fine, following your indications.

    Thanks !

    Laurent.

  • 0   in reply to 

    Hi Laurent,

    Thanks for the feedback. I'm glad to hear it's working well :-)

    Kind regards,

    - Richard.