配置规范未选择 ClearCase 结帐版本

标签 clearcase

从使用基本 ClearCase 的快照 View 中,我想从我的快照 View 中未选择的分支中 check out 文件的最新版本。我希望这是可能的,因为您可以从版本树浏览器工具中做到这一点。

然而,the documentation for the checkout command声称您不能在快照中执行此操作(强调我的):[ 编辑:是的你可以!见下文。]

Nonstandard checkouts

By default, the checkout command checks out these versions:

  • The most recent version on a branch, if you are using a dynamic view
  • The version currently loaded in the view, if you are using a snapshot view

To modify a different version, you can either use the –version option or create a subbranch at that version. (See the mkbranch reference page). Furthermore, from a single view, you can have only one checkout per element at a time.

Note: When you work in a snapshot view, the only version of a directory element that can be checked out is the version currently loaded in the view. Therefore, the –version and –branch options do not work.



如何从命令行 check out 未选择的版本?

[ 编辑:在这里,我误读了“注意:”部分。帮助的意思是目录 无法使用 -version checkout 或 -branch args,但普通文件可以。]

最佳答案

OP dss539选择的实际解决方案是使用 cleartool checkout直接(见 cleartool checkout man page)

cleartool checkout -bra/nch branch-pname | -ver/sion

它适用于动态或快照 View 中的文件(而不是目录)。

如果您不想修改当前快照文件的配置规范,则可以:
  • 要么使用单独的 View (动态 View ,以便立即选择正确的版本),并随意修改另一个 View (动态 View )的配置规范,
    并将版本复制回您的快照 View 。
    另请参阅“How would you select versions from a specific branch in ClearCase? ”以获取配置规范示例。
    ...
    实际上,您甚至不需要修改该动态 View 的配置规范:
    您可以使用 extended pathname of the version you want直接访问和复制正确的版本。
  • 或使用 cleartool get 命令(这是“发送到”在版本树上执行的操作)。
    见“clearcase command to backup predecessor version of a file?
    (这里不需要单独的 View )
  • 关于配置规范未选择 ClearCase 结帐版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16218464/

    相关文章:

    continuous-integration - 与 ClearCase 和长期更新的快照 View 持续集成

    clearcase - 清除工具 rmelem "has checkout"

    clearcase - 选择了错误的事件来检查 clearcase 文件?如何将更改移动到正确的事件?

    version-control - Windows 7 上的 Clearcase 无法创建动态 View

    clearcase - 以 clearcase 格式获取文件版本的脚本

    clearcase - 在 ClearCase 中,如何从命令行以静态 View 查看文件的旧版本?

    linux - 守护进程挂载失败

    clearcase - 如何加载保留时间戳的 ClearCase 快照 View

    clearcase - Clearcase 中事件的反向 Changset

    version-control - 如何克隆 ClearCase 标签类型?