Monday, May 28, 2012

How to find objects present more than twice on the project tree (Synergy tip work)

There is a bug in Synergy 7.1* running on Linux server (PM29256, http://www-304.ibm.com/support/docview.wss?uid=swg1PM29256).
If the same object is present twice in different directories the Sync fails with the  “Warning: Error in Executing SVM request” or crashes altogether.
According to IBM it has been fixed in 7.2.

In the meanwhile the workaround is to replace the object with the soft link to it in all the occasions but the one. This will work for the projects being developed in Linux environment.

To find out the “duplicated” objects:

1.      ccm query "is_member_of(‘4 part project identifier’)" -u -f %objectname > project_members.list
2.      for obj in `cat project_members.list `;do echo $obj >> duplicates; ccm query "has_child('$obj','projectname#version')" >> dupl_dirs;done
3.      grep -B2 ^2\) dupl_dirs

Where the project details are needed use the project in questionJ.


This will yield the list of the objects that appear on the tree twice. E.g.

myfile.h#ver2:incl:1
1) base #ver12 integrate david dir YYY 2  85654
2) http#ver32  integrate david dir YYY 17 21471
--
abc#ver4:script:1
1) foo#ver.3 released abby dir YYY 1  29349
2) bar#ver.2 released abby dir YYY 31 22563

End of story.

Sunday, May 20, 2012

Useful task attributes

Useful task attributes are: %name, %displayname, %objectname, %task_number.
Example:
%displayname=12345
%name=task12345
%objectname=task12345#1:task:probtrac
%task_number=12345

Have "make" report all the commands run as it goes

export QUIET_MAKE=" "


Environment variable QUIET_MAKE will cause make print all the executed commands to STDOUT.
Set it to space: " ".

Press "Ctrl" key while starting Java client to get a debug window

Will see the path searched, log files locations, LAX version, where the preferences are read from etc.

How to find the original process that owns / created the locks as shown by "ccm monitor -showlocks" (Synergy work tip)

Step 1:  show locks

Ø  ccm monitor -showlocks

Locked objects --
/data/synergydb//db+1306154
       ---> myserver:58903:132.106.241.41


Step 2:  find the sessions, including session owner

Ø  ccm ps -engine_address myserver:58903:132.106.241.41

Processes with engine_address = myserver:58903: 132.106.241.41, ...
1 processes located:
----------------------
rfc address (moses.corp.something.com:46106:10.140.2.182)
        process (cmd_interface)
        callback (ciserver:cb_init)
        display ()
        display_name (Classic Command Interface)
        pid (21295)
        user (mybuild)
        host (moses.corp.something.com)
        host_addr ()
        msg_handler_1 (uissys:message_handler)
        database (/data/synergydb//db)
        engine_address (myserver:58903:132.106.241.41)


How to set up the security read restrictions to all the members of specific project that belong to original component but not to other known components

  •  ccm set role group_mgr
  • ccm query -i group (this bring us the grop name)
  •  ccm query "is_member_of('PROJNAME#<proj ver>') and type !='dir' and is_associated_object_of(cvtype='task' and release match '*') and not is_associated_object_of(cvtype='task' and release match 'COMP1*' or release match 'COMP2*' or release match 'COMP3*')" -u -f "%objectname %task_release %task" > compname_only.list
  • ccm groups -a -v :readsource @ (this actually adds the group attribute with a read restriction)
  • ccm set rile developer



E

Synergy conflilcts: "parallel, not included"

Conflicts report a lot of files, all belong to a single task, the task
is for release that is not in process rules (reconfigure properties).

Here is how to find:

1. List all the objects of the offending task (35742):
> ccm task -show objects  35742  -u -f %objectname >  35742 .obj

2. Query for all the immediate successors of the task objects:
> for obj in `cat  35742 .obj`;do ccm query "has_predecessor('$obj')" -f
"%objectname %task_release" >> successors;done

3. Grep the list for objects of your current release:
> grep 27.0.3.20 successors

2) trroute.c#KUKU_27.0.3.20.1:csrc:3 KUKU_27.0.3.20

End of story.

ccm ps -host gives you the command currently running on a specific database!

> ccm ps –host myhost


rfc address (myhost:36996:131.120.211.116)
        process (engine)
        callback (engine_startup:cb_init)
        platform (unix)
        pid (15767)
        user (mybuild)
        host (myhost)
        host_addr ()
        ui_address (client.corp.company.com:53851:10.213.1.130)
        database (/data/synergydb/mydb/db)
        reconfigure (1/project/KU110/Appl_1.11.08DL_B,1/project/KU110/Appl_1.11.08DL_B)

Set up Synergy Linux client to use non-default merge tool (work tip Synergy merge compare)

To customize merge and compare utilities for Synergy Java client running on Linux:

1. Exit java client.

2. Assuming you use BeyondCompare as a merge and compare tool, and it is installed as /usr/bin/bcompare

 Add into ~/.ccm.user.properties file the following lines:

  unix.tool.merge.ascii=/usr/bin/bcompare %file1 %file2 -mergeoutput\=%outfile
  unix.tool.compare.ascii=/usr/bin/bcompare %file1 %file2

Changes will have an effect when Synergy starts next time.