配置规格未选择ClearCase签出版本

问题描述:

从使用基本ClearCase的快照视图中,我要从快照视图中未选择的分支中检出文件的最新版本。我希望这是可能的,因为您可以从版本树浏览器工具中完成。

From a snapshot view using base ClearCase, I want to checkout the latest version of a file from a branch that is NOT selected in my snapshot view. I would expect this to be possible, because you can do it from the version tree browser tool.

但是, checkout 命令声称您不能在快照中执行此操作(强调我的操作):[ edit:是的,可以!

However, the documentation for the checkout command claims that you can't do this in a snapshot (emphasis mine): [edit: Yes you can! See below.]


非标准结帐

Nonstandard checkouts

默认情况下,checkout命令会检查
这些版本:

By default, the checkout command checks out these versions:


  • 分支上的最新版本(如果您使用的是动态视图)

  • 如果使用快照视图,则当前在视图中加载的版本

要修改其他版本,您可以使用–version选项或在该版本中创建子分支。 (请参阅mkbranch
参考页)。此外,从单一角度来看,每个元素一次只能
个结帐。

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.

注意:使用快照视图中,可以检出的
目录元素的唯一版本是该视图中当前加载的
版本。因此, –version和–branch选项不起作用

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.

我该如何

[ edit:在这里我误读了注意:部分。帮助的意思是无法使用-版本-分支$ c检出目录 $ c> args,但可以使用普通文件。]

[edit: Here I misread the "Note:" section. What the help means is that directories can't be checked out using the -version or -branch args, but normal files can be.]

OP dss539 是直接使用 cleartool checkout (请参见 cleartool checkout 手册页

The actual solution selected by the OP dss539 is to use cleartool checkout directly (see cleartool checkout man page)

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

适用于动态或快照中的文件(而非目录)视图。

如果您不想修改当前快照文件的配置规范,则可以可以:

If you don't want to modify the config spec of your current snapshot file, then you can:

  • either use a separate view (a dynamic one in order to have the right version immediately selected), and modify at will the config spec of that other (dynamic view),
    And copy the version back to your snapshot view.
    See also "How would you select versions from a specific branch in ClearCase?" for config spec example.
    ...
    Actually, you don't even need to modify the config spec of that dynamic view:
    You can use the extended pathname of the version you want to directly access and copy the right version.

或使用 cleartool get 命令(这是什么发送到正在版本树上执行。)

请参阅 clearcase命令来备份文件的先前版本。 ?

(您在这里不需要单独的视图)

or use the cleartool get command (which is what "Send To" is doing on the version Tree).
See "clearcase command to backup predecessor version of a file?"
(You don't need a separate view here)