2

我有一个 Integrity Sandbox,我在没有递归到子项目的情况下签出了它。大约有 30 个子项目,其中只有一个大的构建档案。

由于我想通过 jenkins 工作定期使用这个沙箱并且需要重新同步子项目中的数据,我不想重新调整整个沙箱。我想要所有子项目,但命名的那个Archive我需要通过 cli 命令来完成。

我已经查看了参考,si resync唯一可以满足我需求的选项是--filter. 不幸的是,在文档中,只有一本关于如何通过--filter=file:<expression>.

我试过了,si resync -S C:\MySandbox\project.pj --recurse --filter=file:"!Archiv"但这并不排除存档文件夹。

有什么提示我在这里做错了吗?或者另一个问题:是否甚至可以使用 cli 排除目录?

4

1 回答 1

1

根据您使用的完整性版本,有一个称为“沙盒范围”的功能。沙盒的范围可以在沙盒创建期间设置,也可以针对已给定的沙盒进行更改。

您可以使用以下命令排除所需的子项目,然后重新同步命令将忽略此子项目

si configuresandbox --scope="!name:Archiv"

您可以在 PTC 社区中找到更多信息

命令帮助

创建沙箱

H:\>si createsandbox -?
Usage: si createsandbox options... directory; options are:
    --lineTerminator=[lf|crlf|native|cr]  Line terminator to use in this san
dbox
    --[no]populate  Populate sandbox with members
    -R  Recurse into subsandboxes creation
    --[no|confirm]recurse  Recurse into subsandboxes creation
    --scope=attribute:name[=value]
             memberrevlabellike:<expression>
             anyrevlabellike:<expression>
             name:<expression>
             path:<expression>
             type:text|binary
             any
             subproject:<expression>
    --[no]sparse  Create sparse sandbox
    --[no]openView  Activate sandbox view after completing the command
    --devpath=value  The development path (to refer variant projects)
    --[no]failOnAmbiguousProject  Whether to abort when multiple projects co
rrespond to a flat project string.
    -P value  The name of the target project
    --project=value  The name of the target project
    --projectRevision=value  The project revision (to refer build projects)
    --[no]awaitServer  If server does not respond, keep trying
    -?  Shows the usage for a command
    --[no]batch  Control batch mode (no user interaction in batch mode)
    --cwd=value  Act as if command executed in specified directory
    -F value  Read the selection from a specified file
    --forceConfirm=[yes|no]  Specify an answer to all confirmation questions

    -g  User interaction should happen via the GUI
    --gui  User interaction should happen via the GUI
    --hostname=value  Hostname of server
    -N  Responds to all confirmations with "no"
    --no  Responds to all confirmations with "no"
    --password=value  Credentials (e.g., password) to login with
    --port=value  TCP/IP port number of server
    --quiet  Control status display
    --selectionFile=value  Read the selection from a specified file
    --settingsUI=[gui|default]  Control UI for command options
    --status=[none|gui|gui.actions|default]  Control status display
    --usage  Shows the usage for a command
    --user=value  Username to login to server with
    -Y  Responds to all confirmations with "yes"
    --yes  Responds to all confirmations with "yes"

更改沙盒配置

H:\>si configuresandbox -?
Usage: si configuresandbox options... sandbox location...; options are:
    --[no]computeChecksums
    --lineTerminator=[lf|crlf|native|cr]  Line terminator to use in this san
dbox
    --scope=attribute:name[=value]
             memberrevlabellike:<expression>
             anyrevlabellike:<expression>
             name:<expression>
             path:<expression>
             type:text|binary
             any
             subproject:<expression>
    --[no]sparse  Make the sandbox sparse
    -?  Shows the usage for a command
    --[no]batch  Control batch mode (no user interaction in batch mode)
    --cwd=value  Act as if command executed in specified directory
    -F value  Read the selection from a specified file
    --forceConfirm=[yes|no]  Specify an answer to all confirmation questions

    -g  User interaction should happen via the GUI
    --gui  User interaction should happen via the GUI
    --hostname=value  Hostname of server
    -N  Responds to all confirmations with "no"
    --no  Responds to all confirmations with "no"
    --password=value  Credentials (e.g., password) to login with
    --port=value  TCP/IP port number of server
    --quiet  Control status display
    --selectionFile=value  Read the selection from a specified file
    --settingsUI=[gui|default]  Control UI for command options
    --status=[none|gui|gui.actions|default]  Control status display
    --usage  Shows the usage for a command
    --user=value  Username to login to server with
    -Y  Responds to all confirmations with "yes"
    --yes  Responds to all confirmations with "yes"
于 2018-02-07T13:34:47.797 回答