是否有 cleartool 命令可用于查找文件是符号链接还是元素?
Is there cleartool command available to find whether a file is symlink or element?
我正在尝试使用 Cleartool co 命令检出文件。如果文件是符号链接,则失败为
cleartool: Error: Not an element:
因此,我的结帐操作失败了。我想避免这种情况。我想在结帐前检查文件是否是符号链接。是否有 cleartool 命令可用于查找文件是否为符号链接?
文章“Symbolic links in snapshot views”为错误消息提供了一些上下文:
You cannot check out a file element from a symbolic link path; you must check out the link target.
您将在“About checking out Symbolic Link (symlink) Targets in dynamic views”中找到更多信息
In a snapshot view, the symbolic link target must be loaded in your view also, in order for the Symlink Target Operations to appear.
However, these options are limited, such as the checkout does not work, and the alternatives are to either Warp To Symlink Target or use a dynamic view.
所以:
I want to check whether the file is symlink before checkout.
考虑到 cleartool ln
, cleartool describe
and fmt_ccase
,我会在结账前做:
cleartool describe -fmt "%[slink_text]p" myFile
这将显示符号 link 的 目标,如 cleartool ls
所显示。
如果结果为空,则不是symlink。
我正在尝试使用 Cleartool co 命令检出文件。如果文件是符号链接,则失败为
cleartool: Error: Not an element:
因此,我的结帐操作失败了。我想避免这种情况。我想在结帐前检查文件是否是符号链接。是否有 cleartool 命令可用于查找文件是否为符号链接?
文章“Symbolic links in snapshot views”为错误消息提供了一些上下文:
You cannot check out a file element from a symbolic link path; you must check out the link target.
您将在“About checking out Symbolic Link (symlink) Targets in dynamic views”中找到更多信息
In a snapshot view, the symbolic link target must be loaded in your view also, in order for the Symlink Target Operations to appear.
However, these options are limited, such as the checkout does not work, and the alternatives are to either Warp To Symlink Target or use a dynamic view.
所以:
I want to check whether the file is symlink before checkout.
考虑到 cleartool ln
, cleartool describe
and fmt_ccase
,我会在结账前做:
cleartool describe -fmt "%[slink_text]p" myFile
这将显示符号 link 的 目标,如 cleartool ls
所显示。
如果结果为空,则不是symlink。