从使用基本 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 。
另请参阅“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/