Search code examples
clearcasecleartool

How to verify view's occurence before creation


I created a view using cleartool command.

cleartool mkview -tag code-count-view -nsh $ccViewspath+$ccViewName

But as it is added as part of script while executing next time , i am facing issue says that view exists already

How to verify whether view name already exists or not?


Solution

  • A simple cleartool lsview yourViewTag is enough to check if a dynamic view exists.
    Which is your case (your cleartool commands creates a dynamic view)

    For a snapshot view, you would have the additional issue to find/check the root directory of said snapshot view, which isn't always easy.