Topic
4 replies Latest Post - ‏2013-01-14T07:49:13Z by SystemAdmin
SystemAdmin
SystemAdmin
47293 Posts
ACCEPTED ANSWER

Pinned topic Evaluating time statements in config_spec

‏2013-01-10T14:46:52Z |
Hi

The documentation states:
The date/time specification is evaluated when you set or edit the config spec, and whenever the view_server process is started (for example, with startview or setview (dynamic views only)).

It is true that the time statements are evaluated when you set the config_spec (ct setcs/edcs). But the time statements are not evaluated when I perform "ct startview" or "ct setview". I have tested with stopping the view server process (ct endview -server) and then starting it again, but the time statements are not re-evaluated. Am I missing something or is the documentation wrong?

I'm using ClearCase 8.

/Atle
Updated on 2013-01-14T07:49:13Z at 2013-01-14T07:49:13Z by SystemAdmin
  • brcowan
    brcowan
    719 Posts
    ACCEPTED ANSWER

    Re: Evaluating time statements in config_spec

    ‏2013-01-11T14:02:33Z  in response to SystemAdmin
    Could you provide a concrete example of the time statement in question and what unanticipated behavior you are seeing?

    =================================================================
    Brian Cowan
    Advisory Software Engineer
    ClearCase Software Advisory Team (SWAT)
    Rational Software
    IBM Software Group
    550 King St
    Littleton, MA 01460

    Phone: 1.978.899.5436
    Web: http://www.ibm.com/software/rational/support/
    • SystemAdmin
      SystemAdmin
      47293 Posts
      ACCEPTED ANSWER

      Re: Evaluating time statements in config_spec

      ‏2013-01-11T15:50:19Z  in response to brcowan
      Ok, here is an example. I have one view (test_view) with the following config_spec:
      element * CHECKEDOUT
      time now
      element * /main/LATEST

      Then I perform the following Linux shell command
      >ct setview -exec "ct ls /vobs/smn/test/test.txt" test_view
      /vobs/smn/test/test.txt@@/main/18 Rule: /main/LATEST -time 2013-01-11T16:17:59+01:00

      Then from another view I check in a new version of the test.txt file.

      Performing the same command gives the same output:
      >ct setview -exec "ct ls /vobs/smn/test/test.txt" test_view
      /vobs/smn/test/test.txt@@/main/18 Rule: /main/LATEST -time 2013-01-11T16:17:59+01:00

      This shows that the time statement in my config_spec is not reevaluated when setview is performed.

      My next test was to stop the view:
      >ct endview -server test_view
      I can see that the view_server process for test_view is stopped on the view server.

      A new check gives same result:
      >ct setview -exec "ct ls /vobs/smn/test/test.txt" test_view
      /vobs/smn/test/test.txt@@/main/18 Rule: /main/LATEST -time 2013-01-11T16:17:59+01:00

      Then I try to use setcs to get the config_spec to be reevaluated:
      >ct setcs -cur -tag test_view
      And now the new version is displayed:
      >ct setview -exec "ct ls /vobs/smn/test/test.txt" test_view
      /vobs/smn/test/test.txt@@/main/19 Rule: /main/LATEST -time 2013-01-11T16:43:09+01:00

      This shows that "ct setcs" reevaluate the config spec.

      I do not complain about the behaviour since I think its sensible that the config spec is reevaluated only during setcs/edcs and not setview/startview. But the documentation should be updated.

      /Atle
      • brcowan
        brcowan
        719 Posts
        ACCEPTED ANSWER

        Re: Evaluating time statements in config_spec

        ‏2013-01-11T16:40:45Z  in response to SystemAdmin
        "-time now" and "time now" are very strange beasts indeed.

        When I look in the config_spec reference manual page, I see the following about the relative times in the time clause and rule:
        The date/time specification is evaluated when you set or edit the config spec, and whenever the view_server process is started (for example, with startview or setview (dynamic views only)).

        I am pretty sure that the documentation was correct when it was originally written, and I know that this is the exact same wording from the ClearCase 2002.05.00 manual. (I just checked my old paper manual.)

        At one point, the view server used to recompile the view's configspec on startup, so I'm pretty sure where this is coming from. If you PM me your contact details, I can start the official APAR process (or just enter the internal doc defect, but the only way you know it changed would be what those 2 lines disappear off the infocenter.

        =================================================================
        Brian Cowan
        Advisory Software Engineer
        ClearCase Software Advisory Team (SWAT)
        Rational Software
        IBM Software Group
        550 King St
        Littleton, MA 01460

        Phone: 1.978.899.5436
        Web: http://www.ibm.com/software/rational/support/
        • SystemAdmin
          SystemAdmin
          47293 Posts
          ACCEPTED ANSWER

          Re: Evaluating time statements in config_spec

          ‏2013-01-14T07:49:13Z  in response to brcowan
          Thanks. I just sent you my contact info. Looking forward to seeing the updated documentation.
          /Atle