Revision Control and Cloverleaf

Clovertech Forums Read Only Archives Cloverleaf General Revision Control and Cloverleaf

  • Creator
    Topic
  • #51014
    Richard Hart
    Participant

      This is how we work, using TCL scripts on AIX.

      Firstly we setup Cloverleaf to have the user ‘hci’ own the Cloverleaf installation and key areas of a Cloverleaf site. A user ‘hcimgr’ owns the non user-development Cloverleaf sites, but source code – tclprocs, formats etc – are owned by hci to avoid potential changes.

      The developers, work in their own Cloverleaf sites and can access hci/hcimgr through ‘sudo’ for migration of code and site control.

      We have a CVS repository for the various components

      eg

         tclprocs

         pdls

         NetConfig [the CVS file is NetConfig_]

         etc

      Each developers has the CVS ‘local’ repository in their Cloverleaf site directories which detail the CVS repository etc. A developer can perform any cvs command on any file (this asumes they know what they are doing!).

      We use Unix shell scripts to test the code by passing a data file to the hcitpstest and checking the output; our translation code displays the raw and translated messages. Our code also checks CVS revisions of any library/table code at startup.

      Once a developer has verified that all is OK, the code is checked in to CVS and the test rerun and documented with the correct revisions of the code.  The change control process is applied for migration to dev/test and later production.

      eg

                             #

                             # display the RCS information from this file AND the library (default)

                             # check library code

                             #

                     RcsInfo GlobCXT$HciConnName “$Id: ccm_xlate_top.tcl,v 1.55 2009/05/20 08:27:05 he00387 Exp $”

                     RcsInfo GlobCXT$HciConnName

                     RcsVerChk GlobCXT$HciConnName 1.48

                     RcsInfo GlobCXT$HciConnName [RcsInfo_ccm_library]

                     RcsVerChk GlobCXT$HciConnName 1.16 [RcsInfo_ccm_library]

      The ‘real’ sites store their TCL code in one repository, with separate directories and a ‘library’ directory.  We use ‘make’ (see below) which will delete and then check out the latest copy of the source code – CVS tags can be used in a makefile.  The makefile also ‘adds’ references for the library code in the tclIndex (see below).

      We use Unix links to link Cloverleaf sites tclprocs and other directories if applicable. This has the advantage for code migration that a link can be changed to point to the new code and pointed back for backout!

      include ../Makefile

      CODE: ccm_code_ack.tcl ccm_code_ackproc.tcl ccm_code_trx_id_ack.tcl ccm_code_smt_send.tcl

             @echo $* Complete

      LIBRARY: ccm_library.tcl

             @echo $* Complete

      TABLES: ccm_tables_anp_FH.tcl ccm_tables_anp_FM.tcl ccm_tables_anp_KE.tcl ccm_tables_anp_PM.tcl ccm_tables_anp_QE.tcl ccm_tables_anp_RP.tcl ccm_tables_bucket.tcl ccm_tables_ris.tcl ccm_tables_top.tcl

      ccm_tables_ult.tcl

             @echo $* Complete

      XLATE: ccm_xlate_top.tcl ccm_xlate_cap.tcl ccm_xlate_ris.tcl ccm_xlate_ult.tcl

             @echo $* Complete

      The tclIndex – created using the ‘mktclIndex’ command and a few ‘greps’ is

      # Tcl autoload index file, version 2.0

      # This file is generated by the “auto_mkindex” command

      # and sourced to set up indexing information for one or

      # more commands.  Typically each line is a command that

      # sets an element in the auto_index array, where the

      # element name is the name of a command and the value is

      # a script that loads the command.

      set auto_index(MakeMrn)

        ]

        set auto_index(MakeAcct)

          ]

          set auto_index(MakePtType)

            ]

            set auto_index(MakeLabHospitalService)

              ]

              set auto_index(MakeCtrlId)

                ]

                set auto_index(MapHexChars)

                  ]

                  set auto_index(TranEncChars)

                    ]

                    set auto_index(RcsInfo_ccm_library)

                      ]

                      set auto_index(PatientClass)

                        ]

                        set auto_index(BucketReportEmail)

                          ]

                          set auto_index(ReportEmail)

                            ]

                            set auto_index(ccm_xlate_ris)

                              ]

                              set auto_index(ccm_xlate_top)

                                ]

                                set auto_index(ccm_xlate_ult)

                                  ]

                                  set auto_index(ccm_code_smt_send)

                                    ]

                                    set auto_index(ccm_code_ack)

                                      ]

                                      set auto_index(ccm_code_ackproc)

                                        ]

                                        set auto_index(ccm_code_trx_id_ack)

                                          ]

                                          set auto_index(ccm_xlate_cap)

                                            ]

                                            set auto_index(gen_code_resend)

                                              ]

                                              set auto_index(gen_code_splitter)

                                                ]

                                                set auto_index(gen_code_printmsg)

                                                  ]

                                                  set auto_index(gen_code_msginfo)

                                                    ]

                                                    set auto_index(gen_code_mkreply)

                                                      ]

                                                      set auto_index(gen_code_ut_metawrite_info)

                                                        ]

                                                        set auto_index(gen_code_over)

                                                          ]

                                                          set auto_index(Print)

                                                            ]

                                                            set auto_index(RetRepeat)

                                                              ]

                                                              set auto_index(RetComp)

                                                                ]

                                                                set auto_index(ChangeField)

                                                                  ]

                                                                  set auto_index(SourceTablesFile)

                                                                    ]

                                                                    set auto_index(LoadConfigFile)

                                                                      ]

                                                                      set auto_index(IsNull)

                                                                        ]

                                                                        set auto_index(RangeChk)

                                                                          ]

                                                                          set auto_index(RcsInfo)

                                                                            ]

                                                                            set auto_index(RcsVerChk)

                                                                              ]

                                                                              set auto_index(XlateInfo)

                                                                                ]

                                                                                set auto_index(SplitMsg)

                                                                                  ]

                                                                                  set auto_index(XlateMsg)

                                                                                    ]

                                                                                    set auto_index(JoinMsg)

                                                                                      ]

                                                                                      set auto_index(TrimSeg)

                                                                                        ]

                                                                                        set auto_index(AddSeg)

                                                                                          ]

                                                                                          set auto_index(GetSeg)

                                                                                            ]

                                                                                            set auto_index(SetSeg)

                                                                                              ]

                                                                                              set auto_index(DelSegId)

                                                                                                ]

                                                                                                set auto_index(RetOBX)

                                                                                                  ]

                                                                                                  set auto_index(RetField)

                                                                                                    ]

                                                                                                    set auto_index(StdTopCampusCode)

                                                                                                      ]

                                                                                                      set auto_index(StdCampusCode)

                                                                                                        ]

                                                                                                        set auto_index(EstablishmentCode)

                                                                                                          ]

                                                                                                          set auto_index(AddList)

                                                                                                            ]

                                                                                                          • The forum ‘General’ is closed to new topics and replies.