• Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,302
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56
  • 02/16/10 11:56

Transcript

  • 1. Introduction to Synergy CLI Yaron Zelichover February 2010
  • 2.
    • Agenda
    • CLI usage
    • Starting a CLI session - ccm start
    • Attributes and Relations
    • Queries
        • Query command
        • Query types
    • Additional commands:
        • Showing source contents
        • Execute Synergy commands found in a file
        • Typedef / Users/ Delim
    Synergy CLI
  • 3.
    • Purpose
    • How to use CLI as a way to improve Synergy usage in your organization
    • Usage of Synergy CLI
    • Automations of CM processes (builds, branching, etc…)
    • Complex queries
    • Objects manipulation (attributes, relations)
    • Administration and maintenance
    Synergy CLI
  • 4.
    • Starting a CLI session – ‘ccm start’
    • CLI requires Synergy session of classic UI
    • > ccm start [-q] [-d database_path] [-h Engine_host]
    • [-n username] [-pw password] [-r initial_role]
    • [-m] [-nogui ] [–u pathname] [-home homedir]
    • CCM_ADDR env. variable
    • > ccm stop
    Synergy CLI
  • 5.
    • Attributes and Relations
    • Attributes on objects: name, owner, create_time, etc…
    • Relations between objects:
        • From a task to a source object (associated_cv)
        • From a versioned object to its history successor (successor)
        • From CR to associated task (associated_task)
    Synergy CLI
  • 6.
    • Attribute command – ‘ccm attr’ (1)
    • List/list-all/show object’s attribute/s
        • ccm attr -l|-la file_spec
        • ccm attr -s attr_name file_spec
    • Modify object’s attribute
        • ccm attr -m attr_name -v value file_spec
    • Create object’s attribute
        • ccm attr -c attr_name -t type [-v value] file_spec
    • Example:
        • ccm attr -l task50~1:task:probtrac
    Synergy CLI
  • 7.
    • Attribute command – ‘ccm attr’ (2)
    • Example: Define CR mandatory on Tasks
      • To set this up just query for the 'task' cvtype:
        • > ccm query –n task –t cvtype
        • 1) base/cvtype/task/1 ac_rel ccm_root cvtype <void> base <void>
      • Set role to ccm_admin:
        • > ccm set role ccm_admin
      • Create the attribute 'required_attributes', type text if it doesn't exist.
        • > ccm attr -c required_attributes -t text @
      • Open the attribute for modify:
        • > ccm attr –m required_attributes @
      • Add 'change_request' on its own line.
      • Restart the session.
    Synergy CLI
  • 8.
    • Relate command – ‘ccm relate’ (1)
    • Showing relationships to and from an object
      • ccm relate -s [-n relationship_name] -f|-t object_spec
        • Example: >ccm relate -s -n associated_cv -f task50~1:task:probtrac
    Synergy CLI
  • 9.
    • Relate command – ‘ccm relate’ (2)
    • Creating a relationship from one object to another
      • ccm relate -n relationship_name -f from_object_spec -t to_object_spec
        • ccm relate -n successor -f print.c~5.1.1:csrc:1 -t print.c~6:csrc:1
    • Deleting a relationship between two objects
      • ccm unrelate -n relationship_name -f from_object_spec -t to_object_spec
        • ccm unrelate -n successor -f print.c~5.1.1:csrc:1 -t print.c~6:csrc:1
    Synergy CLI
  • 10.
    • Query command – ‘ccm query’
    • ccm query [-o owner] [-t type] [-f format] [-u] [query_string]
    • Redirection query results to a file
      • >ccm query … >> file_path
    Synergy CLI
  • 11.
    • Types of Queries (1)
    • Queries Using Attribute Value Clauses
      • &quot; attr_name relative_operator ’ constant’ “
          • ccm query “abc=’test’ ”
          • ccm query “abc match ‘*test*’ ”
    • Queries Using Function Test Clauses
      • &quot; function (’ function_arguments ’)&quot;
          • ccm query “has_attr(‘abc’)”
          • ccm query “is_member_of(‘projname-version’)”
    Synergy CLI
  • 12.
    • Types of Queries (2)
    • Time-Based Queries
        • Relative time: +/-days:hours:minutes:seconds
            • Query for all objects that were created in the last 10 days
            • > ccm query &quot;create_time > time('-10:0:0:0')&quot;
        • Absolute date
            • Query for all objects that have been modified after Feb 14 th
            • > ccm query &quot;modify_time >time('02/14/2010')&quot;
        • Tip: Use ‘Change’ to see examples of time-based queries
    Synergy CLI
  • 13.
    • Types of Queries (3)
    • Queries on few Clauses using logic gates
        • &quot; not query_clause “
          • >ccm query &quot;not is_bound()&quot;
        • &quot; query_clause and|or query_clause &quot;
          • >ccm query “is_bound() and modify_time < time(’Fri Dec 12 2009’)&quot;
    Synergy CLI
  • 14.
    • Types of Queries (4)
    • Query for Related Objects
      • is_ relationship-name _of( objectname )
          • Example: >ccm query &quot;is_successor_of('compiling.cmd~3:cmd:1')“
            • 1) compiling.cmd~4
      • has_ relationship-name ( objectname )
          • Example: >ccm query &quot;has_successor('compiling.cmd~3:cmd:1')&quot;
            • 1) compiling.cmd~2
    • Nested Queries
      • “ A query within a query”
        • ccm query -t problem &quot;(has_associated_task(cvtype='task' and status ='task_assigned' and resolver='user_name'))&quot; 
    Synergy CLI
  • 15.
    • Additional commands (1)
    • Showing source contents
      • Cat command – ‘ccm cat’
        • >ccm cat build.bat~1:shsrc:2
      • Ccm attr –s source file_spec
        • >ccm attr -s source build.bat~1:shsrc:2
    Synergy CLI
  • 16.
    • Additional commands (2)
    • Execute Synergy commands found in a file
      • Source command – ‘ccm source’
        • >ccm source ccm_product_cleanup
        • The ccm_product_cleanup file contains the following commands:
            • set role ccm_admin
            • query /type executable &quot;not is_bound()&quot;
            • collapse @
    Synergy CLI
  • 17.
    • Additional commands (3)
    • Typedef command
        • Create/ Modify existing type
          • ccm typedef jpeg /d &quot;JPEG Image&quot; /s binary /fw &quot;.jpeg .jpg&quot; /fu &quot;.jpeg .jpg&quot;
        • Import type from a file to a Synergy db
          • ccm typedef /import fmdoc /dir c: ypes_to_import
        • Export type from Synergy db to a file
          • ccm typedef /export pascal /dir &quot;c:exported types&quot;
    Synergy CLI
  • 18.
    • Additional commands (4)
    • Add/remove users or change permissions – ‘ccm users’ command
      • >ccm users
          • user erin = developer ccm_admin; user heather = writer; user matt = developer build_mgr ccm_admin;
    • Change the value of the delimiter character – ‘ccm delim’ command
      • >ccm delim “~”
    Synergy CLI
  • 19.
    • CLI Help
    • Synergy menu help
        • Help > Project View
    • “ IBM Rational Synergy CLI Help” – pdf manual
    • Examples of 'ccm query' Syntax:
    • http://www-01.ibm.com/support/docview.wss?uid=swg21325217
    Synergy CLI
  • 20. Thank You