Beispiel #1
0
def main(force=False, no_deliver=False, initial=False):
    validateCC()
    global IGNORE_CONFLICTS
    if force:
        IGNORE_CONFLICTS=True
    cc_exec(['update', '.'], errors=False)
    log = ['log', '-z', '--first-parent', '--reverse', '--pretty=format:'+ LOG_FORMAT ]
    if not initial:
        log.append(CI_TAG + '..')
    log = git_exec(log)
    if not log:
        return
    cc.rebase()
    first = initial
    for line in log.split('\x00'):
        id, comment = line.split('\x01')
        statuses = getStatuses(id, first)
        first = False
        checkout(statuses, comment.strip(), initial)
        tag(CI_TAG, id)
    if not no_deliver:
        cc.commit()
    if initial:
        git_exec(['commit', '--allow-empty', '-m', 'Empty commit'])
        reset.main('HEAD')
Beispiel #2
0
def main(force=False, no_deliver=False, initial=False, all=False, cclabel=''):
    validateCC()
    global IGNORE_CONFLICTS
    global CC_LABEL
    if cclabel:
        CC_LABEL = cclabel
    if force:
        IGNORE_CONFLICTS = True
    cc_exec(['update', '.'], errors=False)
    log = ['log', '-z', '--reverse', '--pretty=format:' + LOG_FORMAT]
    if not all:
        log.append('--first-parent')
    if not initial:
        log.append(CI_TAG + '..')
    log = git_exec(log)
    if not log:
        return
    cc.rebase()
    for line in log.split('\x00'):
        id, comment = line.split('\x01')
        statuses = getStatuses(id, initial)
        checkout(statuses, comment.strip(), initial)
        tag(CI_TAG, id)
    if not no_deliver:
        cc.commit()
    if initial:
        git_exec(['commit', '--allow-empty', '-m', 'Empty commit'])
        reset.main('HEAD')
Beispiel #3
0
def main(message):
    cc_exec(['update', '.'], errors=False)
    sync.main()
    git_exec(['add', '.'])
    git_exec(['commit', '-m', message])
    reset.main('HEAD')
Beispiel #4
0
def main(message):
    cc_exec(['update', '.'])
    sync.main('*')
    git_exec(['add', '.'])
    git_exec(['commit', '-m', message])
    reset.main('HEAD')
Beispiel #5
0
def main(message):
    cc_exec(['update', '.'], errors=False)
    sync.main()
    git_exec(['add', '-f', '.'])
    git_exec(['commit', '--allow-empty', '-m', message])
    reset.main('HEAD')
Beispiel #6
0
def main(message):
    cc_exec(["update", "."], errors=False)
    sync.main()
    git_exec(["add", "-f", "."])
    git_exec(["commit", "--allow-empty", "-m", message])
    reset.main("HEAD")