Why can't Perl find my file that is in ClearCase?

房东的猫 提交于 2019-11-25 23:38:14

问题


This piece of Perl is telling me that a file in ClearCase doesn\'t exist when it does;

$x = \"PATH/TO/FILE\"
if (-e $x) {
   print \"This file exists on the file system\";
} else {
   print \"I can\'t see this file\";
}

Has anyone seen this before?

Some files return fine. Got me stumped.

Clearcase view is dynamic, hosted on unix.

This piece of code is returning that a file exists and another doesn\'t when they are in the same folder on the same view.


回答1:


Clearcase stores its 'files' as directories

What Aric is trying to tell you is that ClearCase uses extended path names, "extended" because it extends the file name with version path.

So in a dynamic view, any file can be described to reveal its versioning path:

$ ct ls
myFile
$ ct descr -l myFile
myFile@@/main/3

In a dynamic view, you can actually explore the versions of a file (hence the "file as directories") part

$ cd myFile@@
$ ls
main
$ cd main
$ ls
3
$ cat 3
... // content of third version of myFile

Now, if ClearQuest (the issue tracking system) were used here, it would reference activities (change set of file set) of ClearCase.

But with ClearCase, a version of a file (referenced by ClearQuest or obtained through another mean) can very well has been deleted in the dynamic view ("rmnamed" actually).
Meaning a file may be referenced by ClearQuest or by some ClearCase activity, but not be visible directly with ClearCase in the dynamic view.
However, its extended path name would still be accessible in that same dynamic view.




回答2:


Clearcase stores its 'files' as directories. You can cd into an file and get into the actual directory that it's using to store all of the revisions of a file; While the OS hooks usually work, perhaps this is causing Perl to not recognize some of the files.



来源:https://stackoverflow.com/questions/987427/why-cant-perl-find-my-file-that-is-in-clearcase

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!