Clearcase - 查看视图何时创建

时间:2010-10-12 19:50:11

标签: unix version-control clearcase

我们有很多旧的快照视图,我需要找出创建这些快照视图的时间。

有一个转折 - 我们不再运行ClearCase,我们用来运行它的硬件不再存在。但是,我们仍然使用ClearCase内部使用的所有文件,因此我可以转到目录/usr7/viewstore/some_snapshot_sv并查看。
我在这些目录上有时间戳,但这不一定是在创建视图时 我想知道在这个目录结构中的某个地方是否有某个文件,我可以在其中搜索创建日期。

我在Unix / Linux环境中。 ClearCase确实在IRIX上运行。

感谢。

2 个答案:

答案 0 :(得分:2)

与视图关联的任何元数据都位于视图服务器端,其中保存了视图存储。

可能距离创建日期最近的一个文件是视图存储中的 .hostname 文件。
它仅在视图创建时创建和更新,除非视图未注册,否则永远不会更改,然后重新注册(非常罕见)。
view.dat 也是一个不错的选择(但也可以重新生成,仅用于快照视图)

IBM article列出了所有相关文件:

重新启动视图时自动重新生成的文件:

# .access_info
# .pid

可以使用ClearCase命令重新生成的文件:

# .compiled_spec -- regenerate by running cleartool setcs -current
# .hostname -- regenerate by unregistering and re-registering the view
# view.dat -- Snapshot views only:  
  can be regenerated by running the "regen_view_dot_dat.pl" script 
  found in <cc-home-dir>\etc\utils

有关重新生成view.dat文件的详细信息,请参阅technote1204161。

可以通过在与同一用户相同的计算机上创建新视图并将受影响的文件复制到视图存储中来手动替换的文件:

# config_spec
# groups.sd
# identity.sd
# view_db.state (as long as the view is not in the process 
  of being reformatted); see technote 1134858 for more information
# db/view_db.dbd (for schema 9 views only; 2002.05.00 and earlier)
# db/view_db_schema_version
# .view - The copy obtained from the new view must be edited to contain the correct information for the old view as described below. The correct information can be obtained from the output of "cleartool lsview -long <old_viewtag>".
  • 第1行:视图存储目录的位置,格式为hostname:pathname
  • 第2行:视图的UUID(唯一标识符),不得更改
  • 第3行:第1行中指定的hostname

无法替换的文件:

# All other files in the db directory except the ones mentioned above 
  ( view_db_schema_version and view_db.dbd)

答案 1 :(得分:1)

如果你使用cleartool,我想你可以这样试试:



    cleartool lsview -properties [view-name]
    * [view-name]           /net/...[path]
    Created 2014-01-07T18:05:15+02:00 by ...
    Last modified 2014-01-07T21:13:07+02:00 by .....
    Last accessed 2014-01-07T21:13:07+02:00 by .....
    Owner: [owner-name] : rwx (all)
    Group: [group-name]  : r-x (read)
    Other:                  : r-x (read)