如何加载保留时间戳的 ClearCase 快照视图

How to load a ClearCase snapshot view preserving timestamps

我正在尝试创建一个新的快照视图(从命令行)并加载 vob,保留时间戳。创建视图后,我根据需要编辑配置规范,然后是行:

load /vob/myvob

保存时提示我:

Set config spec and load snapshot view "myviewname"? [yes]

键入 "yes" 后,vob 将加载 当前 时间戳。因为我更喜欢它加载时保留时间戳,我的解决方法是删除 vob 的内容,然后从命令行调用:

cleartool update -rename -ptime -force

其中 "ptime" 标志告诉它保留文件的时间戳。

在配置规范中使用 "load" 命令是否有更简单的方法?

编辑: 我在 Solaris 8 上使用 ClearCase 7.1.2.4

您可以查看 Clearteam Explorer preferences:

在更新文件或从服务器加载文件时保留版本创建时间

By default, the last modified time of a ClearCase element is the time when the element was last loaded, updated, or restored.
To specify the modified time of the element as the last modified time of that version in the VOB, click the Preserve version creation time when files are updated or loaded from the server preference.

Note that this preference setting can also affect an Undo Checkout or Undo Hijack operation.
Undoing a hijack operation reloads the corresponding version from the server and restores the last modified time as specified by this preference setting.
Likewise, undoing a checkout operation restores the corresponding version of the element and also restores the last modified time according to this preference setting.

注意:您有 same option for ClearCase 7.1.x.

From the main menu bar, click Window > Preferences to open the Preferences dialog box.

  • If you are using the Rational ClearCase Remote Client for Eclipse, select Team > ClearCase Remote Client > ClearCase Explorer,
  • If you are using the Rational ClearCase Remote Client, select ClearCase Remote Client > ClearCase Explorer.

To specify the modified time of the element as the last modified time of that version in the VOB (instead of the time when the element was last loaded, updated, or restored), click the Preserve version creation time when files are updated or loaded from the server preference

您可以使用“-ptime”选项 'cleartool mkview'。参见:

http://www-01.ibm.com/support/knowledgecenter/SSSH27_8.0.1/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_mkview.htm

首先在命令行上,使用以下命令创建空视图:

cleartool mkview -snapshot -tag <tag_name> -vws \<computer_name>\<views_folder>\<view_name> <path_of_localstorage>

然后使用以下命令根据配置规范加载它:

cleartool setcs -force -overwrite -ptime <CS_Folder_Path>\<CS_File_Name>

详情可关注this link.