Monday, November 9, 2009

How can I find all projects using a particular naming convention or wildcard (e.g. aaa_)? - by Telelogic


Technote (FAQ)
Question
How can I find all projects using a particular naming convention or wildcard (e.g. aaa_)?

Answer

The following cm command line query will return all projects which begin with the string: 'aaa_'

% ccm query "(name match 'aaa_*') and (type='project')"
For further examples of ccm queries, please review the Related Document as listed below "Examples of 'ccm query' Syntax".
CM Synergy 5.0, 5.1, 5.1cs, 6.0, 6.1, 6.2, 6.3, 6.4, 6.5FAQSCM0181AnswerProduct versionPartner ContentInternal ContentCategoryReference I


Historical Number
KB839

Sunday, October 11, 2009

A couple of baseline-related queries

1. List specific project's versions that are part of any baseline:
ccm query "versions_in_a_baseline('<project_spec>')"
e.g.
$ ccm query "versions_in_a_baseline('MyProj_x#0.1_20091008:project:1')"
1)
MyProj_x#0.1_20090929 integrate user1 project MyProj_x 1 185777
2)
MyProj_x#0.1_20091004 integrate user2 project MyProj_x 1 185777
3)
MyProj _x#0.1_20091008 integrate user1 project MyProj_x 1 185777
4)
MyProj_x#MyProj_x_0.1_20090811 integrate user3 project MyProj_x 1 185777
5)
MyProj_x#MyProj_x_0.1_20090819 integrate user3 project MyProj_x 1 185777

2. List all projects in a specific baseline:
ccm baseline -show projects <baseline name>
e.g.
ccm baseline -show projects MyProj_20091008_190808 -u -f %objectname
MyProj_x#0.1_20091008:project:1

3. Show the baseline that the project is associated with:
ccm query -type project -name <proj name> -version <proj version> -f %in_baseline -u
e.g.
$ ccm query -type project -n MyProj_x -v 0.1_20091008 -f %in_baseline -u
MyProj_20091008_190808

4. Find the latest baseline created on a specific project:
ccm query "has_successor('project spec') and status='integrate'" -u -f %in_baseline
e.g. $ ccm query "has_successor('MyProj_x#0.1:project:1') and status='integrate'" -u -f %in_baseline
MyProj_20091008_190808
And combining some of above together:
Here we need to find the predecessor of the current prep project and display the name of the baseline it is part of (instead of the project object name):
This is how we would display the latest project that is in the baseline:
$ ccm query "has_successor('MyProj_x#0.1:project:1') and status='integrate'" -u -f %objectn ame
MyProj_x#0.1_20091008:project:1
And this is how we would show the project's "parent" baseline:
ccm query -type project -n proj_name -v proj_ver -f %in_baseline -u
$ ccm query -type project -n MyProj_x -v 0.1_20091008 -f %in_baseline -u
Now together:
ccm query "has_successor('proj_spec') and status='integrate'" -u -f %in_baseline

$ ccm query "has_successor('
MyProj_x#0.1:project:1') and status='integrate'" -u -f %in_baseline
MyProj_20091008_190808

Enjoy!

Monday, June 15, 2009

Merge fails complaining on java heap memory problems

Issue:

When trying to merge two (close to one another in the history) versions
of an ascii file the merge gets stack.
In the log files (both classic client and java client) there is an error
message:

06/15 08:51:10 An internal error has occurred at Mon Jun 15 08:51:10 IDT
2009
06/15 08:51:10 Unhandled runtime exception: java.lang.OutOfMemoryError
06/15 08:51:10 Exception Message: Java heap space
06/15 08:51:10
06/15 08:51:10 Stack trace:
06/15 08:51:10 java.lang.OutOfMemoryError: Java heap space


Vendor Solution:
If the size of the file is larger then 300k the following procedure worked:

1) Look for the file msynergy.lax Under the bin directory of the client
installation.

2) open the file and look for the option:
lax.nl.java.option.java.heap.size.max=90M

3) Uncomment this option by removing the pound sign (#)

4) Set the max size to 200MB

5) Save the file and restart the session, merge again.

Tuesday, May 19, 2009

Synergy: work area path created with _no_context_ entry

The trouble:

I’m trying to check out a new project and getting a complaint from the CCM that WA already exists, I think it’s because it tries to use the _no_context_ directory again.

What to do?

Here is the story:
The problem was with the project_subdir_template been set wrong. Instead of keywords it contained other symbols (%project_version_BA). As this keyword was not legal, the system replaced it withe the _no_context_ string.
The correct keywords are to be selected from the drop-down keywords list (Classic GUI) or set in the $HOME/.ccm.ini as following:
%dcm_delimiter
%delimiter
%optional_project_instance
%optional_project_instance_no_delim
%platform
%project_instance
%project_instance_no_delim
%project_name
%project_version
%project_version_no_delim
%release
\
And the default wa_path_template for our DBs is to be set as :
wa_path_template = %home/source
project_subdir_template = %project_name%delimiter%project_version

The _no_context_ entry in the workarea path usually indicates that the wa_path_template or the project_subdir_template contain a keyword which could not be resolved and thus has 'no context'.

The keywords need to be either valid text attributes of the project object or 'so-called' psuedo-attributes i.e. keywords defined in the keywords list in the Online Help.

OS environment variables are not necessarily defined keywords in the context of a Synergy project.

Important: the project_subdir_template must contain a keyword which makes the workarea for the particular version of the project unique. (eg %version will add the version string to the workarea path).

Monday, May 11, 2009

Show Synergy types and their content

- get hold of the type "ascii": ccm query -t attype -n ascii

- see the list of attributes for above: ccm attr -la @1ccm attr

- see the content of the attribute "cache_path_template" : ccm attr -s cache_path_template @1

Task is not required on CO anymore and failed to create objects, ci files and run update & synchronize

After an upgrade from 6.4 to 6.5 of one of our databases we now see that checking out a file does not requires associated task to be present (Linux client).

In other words we can check out a file when there is not task and it goes on without any warning.
This is different from the past behavior and we would like to change it back to have the task required on every check out.

Checked the type definitions and we do have the initial state for all basic types set to "working" and "Task required on state" also set to "working". I can not really see the reason why the new file being checked out is not associated with a task.

Windows clients works just fine - requires task as expected.

Also,
The update and object creation fail with the message:

“Create failed: Object of type ‘ascii’ is not allowed in work area”.

Additionally, following is reported:

$ ccm create c -task 18850 ccmtestfile.c
Warning: Error(s) detected in migrate rules:

Invalid type name, ascii
Do you need to use the Type Definition facility?
Line #8 (Auto#1) : MAP_FILE_TO_TYPE .*\.[Tt][Xx][Tt]$ ascii

Invalid type name, shsrc
Do you need to use the Type Definition facility?
Line #8 (Auto#2) : MAP_FILE_TO_TYPE .*\.sh$ shsrc

Invalid type name, c++
Do you need to use the Type Definition facility?
Line #8 (Auto#5) : MAP_FILE_TO_TYPE .*\.C$ c++

Invalid type name, csrc
Do you need to use the Type Definition facility?
Line #8 (Auto#6) : MAP_FILE_TO_TYPE .*\.c$ csrc

Invalid type name, incl
Do you need to use the Type Definition facility?
Line #8 (Auto#7) : MAP_FILE_TO_TYPE .*\.h$ incl

Invalid type name, lsrc
Do you need to use the Type Definition facility?
Line #8 (Auto#8) : MAP_FILE_TO_TYPE .*\.l$ lsrc

Invalid type name, ysrc
Do you need to use the Type Definition facility?
Line #8 (Auto#9) : MAP_FILE_TO_TYPE .*\.y$ ysrc

Too many errors. Error reporting stopped after 7 error reports.
Warning: Unexpected error(s) in default rules file:
/tmp/ccm/dbname/db/../lib/Unix/migrate.rul
Create failed: Object of type 'ascii' is not allowed in a work area.

Solution (came from vendor support):

Verify the value of wa_type for cvtype on ascii is set to "any".
Use the following commands in the ccm_admin role:


>ccm set role ccm_admin

>ccm query -t cvtype -n ascii
>ccm attr -s wa_type @

Check the value returned. If it is not "any", change it:

>ccm attr -m wa_type -v any @

Restart the sessions to see the effect.
------------------------------

For some reason the wa_type was set to sfs during the upgrade.
Once fixed with the attr command also the problems with the Update / Reconcile and Check In of new files seem to be solved.

Friday, January 30, 2009

Synergy: how to list task attributes

> ccm query -n task -t cvtype
1) base/cvtype/task/1 ac_rel ccm_root cvtype base
> ccm attr -l @
assign_policy (string) (local)
create_time (time) (local)
cvtype (string) (local)
dcm_has_modifiable_in (boolean) (local)
delete (acc_method) (local)
dflt_status (string) (local)
displayname (acc_method) (local)
import_noimage_attrs (text) (local)
is_asm (boolean) (local)
is_bindable (boolean) (local)
is_model (boolean) (local)
is_task (boolean) (local)
is_versioned (boolean) (local)
modify_time (time) (local)
name (string) (local)
objectname (acc_method) (local)
owner (string) (local)
post_create (acc_method) (local)
pre_create (acc_method) (local)
relate (acc_method) (local)
require_actual_time (boolean) (local)
restricted_attributes (text) (local)
set_status (acc_method) (local)
source_attrs (text) (local)
status (string) (local)
subsystem (string) (local)
super_type (string) (local)
synopsis_attr (string) (local)
type_description (string) (local)
unrelate (acc_method) (local)
version (string) (local)
xml_import_noimage_attrs (text) (local)