3

在 Clearcase 中,我有一个 VOB,其路径如下:

\Department\ProductGroup\Product1\Development

我有这样的配置规范视图:

element * CHECKEDOUT
element * .../mybranch/LATEST
element * /main/LATEST -mkbranch mybranch
load \Department\ProductGroup\Product1

Product1 的所有源代码都在 Development 目录中。在这个目录之外没有我关心的东西。代码中的所有引用都与此目录相关。

我在目录 c:\dev 中创建了上面的 Clearcase 视图

目前,上述设置创建了一个目录:

c:\dev\Department\ProductGroup\Product1\Development

所有的父目录Development都是空的。我宁愿只有以下目录。

c:\dev\Product1  

映射c:\dev\Product1到 VOB 路径的位置\Department\ProductGroup\Product1\Development。这可能吗?

4

1 回答 1

1

1/ 为什么不只加载 \Department\ProductGroup\Product1\Development ?

load /Department/ProductGroup/Product1/Development

注意:您可以使用 ' /',比 ' \' 更容易,并且 Windows 配置规范确实可以正确解释它。

1之二/如果你想保持一般规则,你可以使用一些“清洁规则

考虑这个配置规范
首先在动态视图中对其进行测试,以便快速检查——即没有无休止的更新重新加载步骤——如果结果确实符合您的需要:文件在下面Development,其他任何地方都没有文件)

element * CHECKEDOUT

# read/write selection rule for the directory and sub-directory
# where you need to work
element /Department/ProductGroup/Development/... .../mybranch/LATEST
element /Department/ProductGroup/Development/... /main/LATEST -mkbranch mybranch

# specific selection rule for the parent directories of Development
# those rules do not contain a mkbranch directive
element /Department/ProductGroup  .../mybranch/LATEST
element /Department/ProductGroup /main/LATEST
element /Department  .../mybranch/LATEST
element /Department /main/LATEST

# cleaning rule right there: anything outside /Department/ProductGroup/Development
# will not be selected, hence not loaded
element /Department/* -none

load \Department

这样,您始终保持相同的加载规则load \Department,并且您的选择规则为您进行清理。

2/关于您的路径问题,您可以使用 Symlink,但最简单的方法是使用subst

subst X: c:\dev\Department\ProductGroup\Product1\Development

您可以继续在 X:\ 中使用您的快照视图

但这不起作用,因为 ClearCase 需要:

  • view.dat(表示目录树的隐藏文件实际上是快照视图)
  • 一个 vob (Department在你的情况下。ProductGroup\Product1\Development是 Vob 中的一条路径Department

    X:>ct lsview -l -full -pro -cview cleartool:错误:无法获取当前视图的视图信息:不是 ClearCase 对象。X:>ct ls cleartool:错误:路径名不在 VOB 中:“。”

出于同样的原因,在 windows 上使用Junction的硬链接将不起作用

c:\dev>junction Product1 Department\ProductGroup\Product1
Junction v1.05 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2007 Mark Russinovich
Systems Internals - http://www.sysinternals.com

Created: C:\dev\Product1
Targetted at: C:\dev\Department\ProductGroup\Product1

C:\cc\xxx>ct ls
cleartool: Error: Pathname is not within a VOB: "."

所以你可以做的是:

subst X: c:\dev

结合 1/ 中的特定加载规则或 1bis/ 中的清洁规则将为您提供:

  • 稍短的路径
  • 没有额外的空子目录

2bis/“迂回”解决方案:

从 ClearCase 资源管理器中,Development从移动Department\ProductGroup\Product1Department! 该动作将记录在 ' mybranch' 版本树中,并且对于在/main/LATEST.

然后subst从上面,你将在 'mybranch' 中工作Department\Development

X:\Department\Development

当你想上市时,采取相反的行动。

于 2009-02-12T06:39:49.003 回答