通过扩展文件名作为目录访问文件标签
Access labels of file through extended filename as directory
我想在 ClearCase 中列出特定文件的所有标签。基于 (how to find all the labels for a given file in clearcase) 处接受的答案中的最后一种方法,我想结合使用 cd
和 dir
。我只使用动态视图,因为我们有数千个版本,所以我猜这种方法比缓慢的 cleartool 查询快得多(ClearCase 在这里慢得要命)。有关信息,我只在 Windows 上工作。
这里是提到的方法:
cd m:/myView/path/to/addon.xml@@
# list all files, not directories: the files are the labels
dir /B /A-D
不幸的是,该方法不适用于每个文件。奇怪的是,即使签入文件上有标签,标签文件也不会出现在目录中。标签文件仅存在于分支文件夹中。
奇怪的是下面的工作:copy filename@@\labelname targetfile
。甚至 copy labelname targetname
也可以在目录 "filename@@" 中工作。我不明白。为什么 dir
不显示这些文件?我尝试了所有属性(比如隐藏文件)等等。
这是 MVFS 中的错误还是我遗漏了什么?正如我所说,它适用于许多文件,但不适用于所有文件。但我不知道这些文件有什么不同。也许文件 extension/type?但这有关系吗?
I don't get it. Why doesn't dir show these files?
因为 dir 是一个 Windows 命令,它将列出 Windows 个文件系统文件,而不是 MVFS (Multi-Version FileSystem) ones, used by a dynamic view。
I don't know what is different with those files. Maybe the file extension/type?
@@
之后的所有内容都是 (see man page),MVFS 动态视图将其模拟为 Windows 文件。
But should this matter?
如果您正在使用 Windows 命令(而不是 cleartool
查询),则不应使用,因为这些扩展路径应该直接由 Windows 可见。
它们是 可访问的 (copy filename@@\labelname targetfile
),但也应该是 可见的(由基于 Windows 文件系统的 dir 命令列出)
特别是 Version labels in extended namespace:
Version labels appear in the extended namespace as hard links (UNIX and Linux) or as additional files (Windows).
On Windows, if version \main
of an element is labeled RLS_1
, the extended namespace directory corresponding to the element's main branch lists both 4
and RLS_1
:
Z:\myvob\src> dir sort.c@@\main
2006-11-10T17:34 1846 4
...
2006-11-10T17:34 1846 RLS_1
如果在 Windows 上创建的标签类型具有每个元素一次的限制,则标签版本的条目将出现在元素的顶级目录中:
Z:\myvob\src> dir sort.c@@ 2006-11-10T17:34 1846 RLS_1
也别忘了 pathnames can involve multiple elements:
After a path name crosses over into the extended namespace with @@
, you must specify a version for each succeeding element in the path name.
For example:
To automatically select versions for elements proj
and src
: cross over to extended namespace at directory element include, specifying a version of include and a version of sort.h
:
Windows:
\proj_vob\src@@\RLS_1\include\RLS_1\sort.h\RLS_1
OP 在评论中添加:
The problem was the once-per-element restriction. This is the default setting in our environment but someone used the once-per-branch setting in his VOB. So the label files could not be created at the top-level directory.
The once-per-element restriction is the mklbtype
default.
A mklbtype -pbranch
command creates a label type that can be used once on each branch of an element.
我想在 ClearCase 中列出特定文件的所有标签。基于 (how to find all the labels for a given file in clearcase) 处接受的答案中的最后一种方法,我想结合使用 cd
和 dir
。我只使用动态视图,因为我们有数千个版本,所以我猜这种方法比缓慢的 cleartool 查询快得多(ClearCase 在这里慢得要命)。有关信息,我只在 Windows 上工作。
这里是提到的方法:
cd m:/myView/path/to/addon.xml@@
# list all files, not directories: the files are the labels
dir /B /A-D
不幸的是,该方法不适用于每个文件。奇怪的是,即使签入文件上有标签,标签文件也不会出现在目录中。标签文件仅存在于分支文件夹中。
奇怪的是下面的工作:copy filename@@\labelname targetfile
。甚至 copy labelname targetname
也可以在目录 "filename@@" 中工作。我不明白。为什么 dir
不显示这些文件?我尝试了所有属性(比如隐藏文件)等等。
这是 MVFS 中的错误还是我遗漏了什么?正如我所说,它适用于许多文件,但不适用于所有文件。但我不知道这些文件有什么不同。也许文件 extension/type?但这有关系吗?
I don't get it. Why doesn't dir show these files?
因为 dir 是一个 Windows 命令,它将列出 Windows 个文件系统文件,而不是 MVFS (Multi-Version FileSystem) ones, used by a dynamic view。
I don't know what is different with those files. Maybe the file extension/type?
@@
之后的所有内容都是
But should this matter?
如果您正在使用 Windows 命令(而不是 cleartool
查询),则不应使用,因为这些扩展路径应该直接由 Windows 可见。
它们是 可访问的 (copy filename@@\labelname targetfile
),但也应该是 可见的(由基于 Windows 文件系统的 dir 命令列出)
特别是 Version labels in extended namespace:
Version labels appear in the extended namespace as hard links (UNIX and Linux) or as additional files (Windows).
On Windows, if version
\main
of an element is labeledRLS_1
, the extended namespace directory corresponding to the element's main branch lists both4
andRLS_1
:
Z:\myvob\src> dir sort.c@@\main
2006-11-10T17:34 1846 4
...
2006-11-10T17:34 1846 RLS_1
如果在 Windows 上创建的标签类型具有每个元素一次的限制,则标签版本的条目将出现在元素的顶级目录中:
Z:\myvob\src> dir sort.c@@ 2006-11-10T17:34 1846 RLS_1
也别忘了 pathnames can involve multiple elements:
After a path name crosses over into the extended namespace with
@@
, you must specify a version for each succeeding element in the path name.
For example:To automatically select versions for elements
proj
andsrc
: cross over to extended namespace at directory element include, specifying a version of include and a version ofsort.h
:
Windows:
\proj_vob\src@@\RLS_1\include\RLS_1\sort.h\RLS_1
OP 在评论中添加:
The problem was the once-per-element restriction. This is the default setting in our environment but someone used the once-per-branch setting in his VOB. So the label files could not be created at the top-level directory.
The once-per-element restriction is the
mklbtype
default.
Amklbtype -pbranch
command creates a label type that can be used once on each branch of an element.