# config_teamtrack.py -- P4DTI configuration for replication to TeamTrack. # Gareth Rees, Ravenbrook Limited, 2000-10-16. # $Id: //info.ravenbrook.com/project/p4dti/branch/2000-11-29/bugzilla-resolution/code/replicator/config_teamtrack.py#2 $ # # Copyright 2000 Ravenbrook Limited. This document is provided "as is", # without any express or implied warranty. In no event will the authors # be held liable for any damages arising from the use of this document. # You may make and distribute copies and derivative works of this # document provided that (1) you do not charge a fee for this document or # for its distribution, and (2) you retain as they appear all copyright # and licence notices and document history entries, and (3) you append # descriptions of your modifications to the document history. import configure_teamtrack import dt_teamtrack import p4 import replicator # The replicator identifier. rid = ???? # The Perforce server identifier. sid = ???? # File to write logs to. log_file = "p4dti.log" # Hostname and optionally port of TeamTrack server. teamtrack_server = ???? # Replicator's username on the TeamTrack server. teamtrack_user = 'P4DTI-%s' % rid # Replicator's user name on TeamTrack server. teamtrack_password = '' # E-mail address of integration administrator. administrator_address = ???? # Address of SMTP server for sending e-mail. smtp_server = ???? # Hostname and port of Perforce server. p4_port = ???? # Replicator's user name on Perforce server. p4_user = 'P4DTI-%s' % rid # Replicator's user name on Perforce server. p4_password = '' # Path to Perforce client executable: must P4/xxx/2000.1/17595 or later. p4_client_executable = 'p4' # A format string used to build the URL for change descriptions, or None if # there is no URL for change descriptions. changelist_url = None # The list of fields that will be replicated between TeamTrack issues and # Perforce jobs. Note that the system fields STATE, OWNER and TITLE are always # replicated and shouldn't appear in this list. replicated_fields = [] # The distingished TeamTrack state that maps to the Perforce state 'closed', or # None if you don't want to distinguish it. See section ? of the Administrator # Guide. Case insensitive. closed_state = None # Advanced users only below here! See appendix E of the Administrator Guide. teamtrack_config, p4_config, replicator_config, jobspec = \ configure_teamtrack.configuration(teamtrack_server = teamtrack_server, teamtrack_user = teamtrack_user, teamtrack_password = teamtrack_password, p4_port = p4_port, p4_user = p4_user, p4_password = p4_password, replicated_fields = replicated_fields, smtp_server = smtp_server, administrator_address = administrator_address, closed_state = closed_state) dt = dt_teamtrack.dt_teamtrack(rid, sid, teamtrack_config) p4_interface = p4.p4(p4_config) r = replicator.replicator(rid, dt, p4_interface, replicator_config) r.p4.run('jobspec -i', [jobspec]) r.init()