I have to use ClearCase at work and the basic workflow requires me to do something like:
cleartool setview <view-tag-name>
view-tag-name
is a dynamic view I might add. From what I've gathered this opens up a new shell that allows me to access files in /vobs/some/path
that go through a mounted MVFS file system. However this second shell on top of the existing shell breaks my Emacs client - Emacs daemon cooperation. Moreover, in another SO answer someone was saying that he didn't bother with setview
at all and so instead of accessing:
/vobs/some/path
(from within a setview
shell)
… he would access:
/view/view-tag-name/vobs/some/path
(without using a setview
shell)
I've experimented a little and it seems that all cleartool
commands work the same way whether I am in /vobs/some/path
(in a setview
shell) or whether I am in /view/view-tag-name/vobs/some/path
(in a plain shell).
So my questions are:
- what's the difference between working in
/vobs/some/path
in a setview
shell versus working in /view/view-tag-name/vobs/some/path
in a plain shell?
- what is the proper term to use when referring to the
/view/view-tag-name
directory?
- why when I do
ct lsview -l -properties -ful view-tag-name
I don't see any reference to the /view/view-tag-name
directory? Isn't this directory associated with the view?
what's the difference between working in /vobs/some/path
in a setview
shell versus working in /view/view-tag-name/vobs/some/path
in a plain shell?
Do not use cleartool setview
: As I explained before, the cleartool setview
command opens a subshell in which commands are supposed to be run, which can be problematic.
Working in /view/view-tag-name/vobs/some/path
means you remain in your main shell, with all its properties.
what is the proper term to use when referring to the /view/view-tag-name
directory?
That references the full path view root folder (inside which you are mounting vobs and accessing versions based on the view config spec and its selection rules)
In /vobs/some/path
, you can still see the view you are in with cleartool pwv ("path working view").
why when I do ct lsview -l -properties -ful view-tag-name
I don't see any reference to the /view/view-tag-name
directory?
You are seeing the property of the view, which will then be mounted in /view/view-tag-name
(on Unix) or M:\view-tag-name
on Windows.
Those properties make no assumption on the runtime usage of that view, they only display static metadata (like the view storage or the view type)
If your workflow was to start emacs and then set into a view from there, things will be strange indeed.
The only thing that setview does differently from startview is that it starts that chrooted shell. Only that shell, and its descendants, will see source code in /vobs/vobtag/... If you work in multiple "setview" shells (for multiple versions of your app to maintain, multiple phases, etc.), you would have multiple otherwise identical shells accessing different versions of the same files via apparently-identical paths.
One thing to be aware of when working with ClearCase is that directories are versioned too. As a result, files added in one view may not appear in the other view if:
- They are based on different versions of the parent directory; or
- The parent directory of the file added to source control hasn't been checked in yet.
Unless your build process requires VOB contents to be visible at /vobs/vobtag, I'd concur with @VonC about not using setview.
I can't really add anything to VonC's other comments.