Search code examples
clearcase

using a snapshot view based on a dynamic view


I already have a dynamic view created for me. Ideally, what I would have liked instead is a snapshot view with the exact same config spec. I have two questions in that regard:

  1. do I have to create a separate snapshot view (with a different tag name) or can I piggy-back on top of the dynamic view to create a snapshot on my local disk? (without using mkview again).
  2. if I do need to run a separate mkview to create the snapshot view, would I have to provide the mkview -sna with a different -tag, -hpa, -gpa and a different snapshot-view-pname ?
  3. would it be transparent to my co-developers whether I am working in a snapshot versus a dynamic view?

Solution

  • do I have to create a separate snapshot view (with a different tag name) or can I piggy-back on top of the dynamic view to create a snapshot on my local disk?

    No: you need to use mkview (-snap) again, in order to create a separate view, a snapshot one with a root folder on your disk.

    See "Proper 'cleartool mkview' for ClearCase Snapshot view creation", assuming we are talking about a base ClearCase view, not an UCM one.

    But then you can re-use the same config spec, at least the selection rules part (since a snapshot view has loading rules specific to its nature, a dynamic view having no need for loading anything: see "Config specs and Load rules difference").
    You can copy them from a cleartool catcs -tag <dyn-view-tag>, and paste them in a cleartool edcs -tag <snap-view-tag> (best done from within the root folder of the snapshot view).
    (an UCM view, snapshot or dynamic, would not need that, as it would be created with -stream, getting the right selection rules based on the foundation baselines of that associated stream)

    would I have to provide the mkview -sna with a different -tag, -hpa, -gpa and a different snapshot-view-pname?

    The tag would be different for sure, hpa (host storage pathname) and gpa (global storage pathname) also in that they would end with <tag-name.vws>, the view storage folder named after your new view tag name.

    would it be transparent to my co-developers whether I am working in a snapshot versus a dynamic view?

    Yes: when you finally check in a file (in a dynamic or snapshot view), your collaborators would see that check in at the same time.
    However, if your collaborators are themselves checking in some files, you would not see those updated version (assuming you are working on the same branch) until you cleartool update your own snapshot view.