AppleScript examples?

Help
2003-02-26
2003-11-21
  • Christopher Corbell

    I'm trying to do basic things with MacCVS Pro's
    AppleScript dictionary but don't quite know how to
    make it work.  Does the MacCVS Pro team have any
    sample AppleScripts that could be shared?

    I'm opening a session file before doing anything else.

    The main things I'd like to make work are the check out
    and update commands.  However I can't figure out what
    the "reference" params to these commands is supposed
    to be - experiments with module name, local root
    path, session, etc. haven't worked.

    Thanks for any help,
    Christopher

     
    • Christopher Corbell

      I still haven't figured out how to use args to
      the commands, e.g. to check out a particular tag or
      branch of a particular module.  I haven't discovered
      how to direct applescript commands to sub-folders
      either, e.g. if you want a different branch of just one
      folder in a module.

      For default module checkouts, this works in a shell script:
      <pre>
      open ~/my_cvs_session
      sleep 60
      osascript << EOS
      tell application "MacCVS Pro 2.7d3 (Carbon)"
      activate
      -- get latest sources
      with timeout of 1200 seconds
      tell session "my_cvs_session"
      check out
      end tell
      end timeout
      end tell
      EOS
      </pre>

      Hope that's useful to someone.
      - Christopher

       
    • Christopher Corbell

      Ok, so I'm talking to myself here, but I hope someone in the future will make use of this...

      check out module (module name) revision (revision name) is now working for me.  For example,

      with timeout of 1200 seconds
      tell session "my_cvs_session"
      checkout module "my_module" revision "my revision"
      end tell
      end timeout

       
    • James

      James - 2003-11-21

      Yours script works great. Thanks for the info.

      Now can I "tag" the source using applescript too?

       

Log in to post a comment.