def main():

    config = load_config_file()
    # Set up logger
    log_file = config['log_file']
    if not log_file.endswith('.log'):
        log_file += '.log'
    FORMAT = '%(asctime)-15s %(message)s'
    logger.basicConfig(filename=log_file, level=logger.DEBUG, format=FORMAT)

    ccm, ccm_pool = start_sessions(config)
    history = load_history(config)

    ccm_hist = CCMHistory(ccm, ccm_pool, history, config['data_file'])
    history = ccm_hist.get_project_history(config['master'],
                                           config['base_project'])

    #    if config.has_key('heads'):
    #        for head in config['heads']:
    #            history = ccm_hist.get_project_history(head, config['base_project'])

    fh = open(config['data_file'] + '.p', 'wb')
    cPickle.dump(history, fh, cPickle.HIGHEST_PROTOCOL)
    fh.close()

    logger.shutdown()
def main():

    config = load_config_file()
    # Set up logger
    log_file = config['log_file']
    if not log_file.endswith('.log'):
        log_file += '.log'
    FORMAT = '%(asctime)-15s %(message)s'
    logger.basicConfig(filename=log_file, level=logger.DEBUG, format=FORMAT)

    ccm, ccm_pool = start_sessions(config)
    history = load_history(config)

    ccm_hist = CCMHistory(ccm, ccm_pool, history, config['data_file'])
    history = ccm_hist.get_project_history(config['master'], config['base_project'])

#    if config.has_key('heads'):
#        for head in config['heads']:
#            history = ccm_hist.get_project_history(head, config['base_project'])
        
    fh = open(config['data_file'] + '.p', 'wb')
    cPickle.dump(history, fh, cPickle.HIGHEST_PROTOCOL)
    fh.close()

    logger.shutdown()
Esempio n. 3
0
def main():

    config = load_config_file()
    ccm, ccm_pool = start_sessions(config)
    history = load_history(config)

    ccm_hist = CCMHistory(ccm, ccm_pool, history, config['data_file'])
    history = ccm_hist.get_project_history(config['master'], config['base_project'])

    if config.has_key('heads'):
        for head in config['heads']:
            history = ccm_hist.get_project_history(head, config['base_project'])
        
    fh = open(config['data_file'] + '.p', 'wb')
    cPickle.dump(history, fh, cPickle.HIGHEST_PROTOCOL)
    fh.close()