コード例 #1
0
ファイル: checkin.py プロジェクト: jlehtnie/git-cc
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')
コード例 #2
0
ファイル: checkin.py プロジェクト: zen4s/git-cc
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')
コード例 #3
0
ファイル: update.py プロジェクト: Codeminded/git-cc
def main(message):
    cc_exec(['update', '.'], errors=False)
    sync.main()
    git_exec(['add', '.'])
    git_exec(['commit', '-m', message])
    reset.main('HEAD')
コード例 #4
0
ファイル: update.py プロジェクト: ralberts/git-cc
def main(message):
    cc_exec(['update', '.'])
    sync.main('*')
    git_exec(['add', '.'])
    git_exec(['commit', '-m', message])
    reset.main('HEAD')
コード例 #5
0
ファイル: update.py プロジェクト: SaM-Solutions/git-cc
def main(message):
    cc_exec(['update', '.'], errors=False)
    sync.main()
    git_exec(['add', '-f', '.'])
    git_exec(['commit', '--allow-empty', '-m', message])
    reset.main('HEAD')
コード例 #6
0
ファイル: update.py プロジェクト: whyrusleeping/git-cc
def main(message):
    cc_exec(["update", "."], errors=False)
    sync.main()
    git_exec(["add", "-f", "."])
    git_exec(["commit", "--allow-empty", "-m", message])
    reset.main("HEAD")