通过扩展的文件名作为目录访问文件的标签 [英] Access labels of file through extended filename as directory

查看:70
本文介绍了通过扩展的文件名作为目录访问文件的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在ClearCase中列出特定文件的所有标签。基于(如何在clearcase中查找给定文件的所有标签)我想使用 cd dir <的组合/ code>。我只使用动态视图,因为我们有成千上万的版本,所以我认为这种方法比慢速的cleartool查询要快得多(ClearCase慢得像地狱一样慢)。对于信息,我仅在Windows上工作。

I want to list all labels of a specific file in ClearCase. Based on the last approach in the accepted answer at (how to find all the labels for a given file in clearcase) I want to use a combination of cd and dir. I only use dynamic views and as we have thousand of versions I guess this approach is much faster than a slow cleartool query (ClearCase is slow as hell here). For info I work on Windows only.

以下是提到的方法:

cd m:/myView/path/to/addon.xml@@
# list all files, not directories: the files are the labels
dir /B /A-D 

不幸的是,该方法不适用于每个文件。奇怪的是,即使签入文件上有标签,标签文件也不会出现在目录中。标签文件仅存在于分支文件夹中。

Unfortunately the approach does not work for every file. The strange thing is that the label files do not appear in the directory even if there are labels on the checked-in file. The label files exist only in the branch folders.

奇怪的是,它的工作原理如下: copy filename @@ \labelname targetfile 。甚至复制标签名targetname 都可以在 filename @@目录中使用。我不明白为什么 dir 不显示这些文件?我尝试了所有属性(例如隐藏文件),等等。

The stranger thing is that the following works: copy filename@@\labelname targetfile. And even a copy labelname targetname works from within the directory "filename@@". I don't get it. Why doesn't dir show these files? I tried all attributes (like hidden files) and so on.

这是MVFS中的错误还是丢失了某些东西?如我所说,它适用于许多文件,但不适用于所有文件。但是我不知道这些文件有什么不同。也许文件扩展名/类型?但这应该吗?

Is this a bug in MVFS or am I missing something? As I said it works for many files but not for all. But I don't know what is different with those files. Maybe the file extension/type? But should this matter?

推荐答案


我不明白。 dir为什么不显示这些文件?

I don't get it. Why doesn't dir show these files?

因为dir是Windows命令,它将列出Windows文件系统文件,而不是 MVFS(多版本文件系统),由动态视图

Because dir is a Windows command which will list Windows filesystem files, not 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?

@@ 之后的所有内容都是 版本扩展的路径名 (请参见手册页),由MVFS动态视图模拟为Windows文件。

Everything after the @@ is a version-extended pathname (see man page), emulated as a Windows file by the MVFS dynamic view.


但这应该吗?

But should this matter?

如果使用Windows命令(而不是 cleartool 查询),则不应该这样做,因为这些扩展路径应该由Windows直接可见。

它们是可访问复制filename @@ \labelname目标文件),但也应可见(由Windows文件系统列出-基于dir的命令)

If you are using Windows commands (and not cleartool queries), it should not, as those extended paths are supposed to be directly visible by Windows.
They are accessible (copy filename@@\labelname targetfile), but should be also visible (listed by a Windows filesystem-based dir command)

尤其是对于 扩展命名空间中的版本标签

In particular, for Version labels in extended namespace:


版本标签在扩展名称空间中以硬链接(UNIX和Linux)或其他文件(Windows)的形式出现。

Version labels appear in the extended namespace as hard links (UNIX and Linux) or as additional files (Windows).

在Windows中,如果版本为<$ c元素的$ c> \main\4 标记为 RLS_1 ,与该元素的主分支相对应的扩展名称空间目录都列出了 4 RLS_1

On Windows, if version \main\4 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上,标签版本的条目会显示在元素顶部级目录:

If the label type was created with the once-per-element restriction, on Windows, an entry for the labeled version appears in the element's top-level directory:

Z:\myvob\src> dir sort.c@@ 2006-11-10T17:34                1846 RLS_1






也不要忘记路径名可以包含多个元素


在路径名通过 @@ 越过扩展名称空间后,必须在路径名称中为每个后续元素指定一个版本。

例如:

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:

要为元素<$自动选择版本c $ c> proj src :越过目录元素include的扩展名称空间,指定include版本和<$ c版本$ c> sort.h :

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






The OP在注释中添加:


The OP adds in the comment:


问题是每元素一次限制。这是我们环境中的默认设置,但有人在他的VOB中使用了每分支一次设置。因此,无法在顶级目录中创建标签文件。

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.

每个元素一次的限制为 mklbtype 默认值。

mklbtype -pbranch 命令创建一个标签类型,该标签类型可以在元素的每个分支上使用一次。

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.

这篇关于通过扩展的文件名作为目录访问文件的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆