Esempio n. 1
0
def test_ftrbr_integrate_conflict_on_mergeftrbr():
    oriR, cloR = utils.clone_makebr_edit_commit_repo(utils.DIR_REPO_CLONE_FTRBR_INTEGRATE)
    so,se,rc = cloR.exe_cmd_succ('git checkout master')
    utils.edit_commit(cloR, msg = 'from master')
    so,se,rc = cloR.exe_cmd_succ('git chk-back')

    so,se,rc = cloR.exe_cmd_deny('git ftrbr-integrate')
    nt.assert_in("Pulling 'master'",                   so)
    nt.assert_in("CONFLICT (content): Merge conflict", so)
    nt.assert_in("Merging 'ftr/work' into 'master",    so)
    nt.assert_in("Automatic merge failed; fix conflicts and then commit the result.", so)
Esempio n. 2
0
def test_ftrbr_push_conflict_on_mergeftrbr():
    oriR, cloR = utils.clone_makebr_edit_commit_repo(utils.DIR_REPO_CLONE_FTRBR_PUSH)

    utils.edit_commit(oriR, "on origin")

    so, se, rc = cloR.exe_cmd_deny("git ftrbr-push")
    nt.assert_in("Pulling 'master'", so)
    nt.assert_in("Fast-forward", so)
    nt.assert_in("Merging 'ftr/work' into 'master'", so)
    nt.assert_in("CONFLICT (content): Merge conflict in a.txt", so)
    nt.assert_in("Automatic merge failed; fix conflicts and then commit the result.", so)
Esempio n. 3
0
def test_ftrbr_integrate_rebase_conflict_on_pullintbr():
    oriR, cloR = utils.clone_makebr_edit_commit_repo(utils.DIR_REPO_CLONE_FTRBR_INTEGRATE)
    utils.edit_commit(oriR, 'on origin')
    so,se,rc = cloR.exe_cmd_succ('git checkout master')
    utils.edit_commit(cloR, 'on clone')

    so,se,rc = cloR.exe_cmd_deny('git ftrbr-integrate-rebase')
    nt.assert_in("Pulling 'master'",                   so)
    nt.assert_in("CONFLICT (content): Merge conflict", so)
    nt.assert_in("Automatic merge failed; fix conflicts and then commit the result.", so)
    nt.assert_not_in("Merging", so)
    nt.assert_not_in("Merging", se)
Esempio n. 4
0
def test_ftrbr_push_rebase_conflict_on_mergeftrbr():
    oriR, cloR = utils.clone_makebr_edit_commit_repo(utils.DIR_REPO_CLONE_FTRBR_PUSH)

    utils.edit_commit(oriR, "on origin")

    so, se, rc = cloR.exe_cmd_deny("git ftrbr-push-rebase")
    nt.assert_in("Pulling 'master'", so)
    nt.assert_in("Fast-forward", so)
    nt.assert_in("Rebasing 'ftr/work' onto 'master'", so)
    nt.assert_in("CONFLICT (content): Merge conflict in a.txt", so)
    nt.assert_in("Patch failed at 0001 modified file", so)
    nt.assert_in('When you have resolved this problem run "git rebase --continue"', so)
Esempio n. 5
0
def test_ftrbr_start_conflict():
    oriR = utils.Repo(utils.DIR_REPO_BASE)
    cloR = utils.Repo(utils.DIR_REPO_CLONE_FTRBR)
    utils.clone_arepo(oriR.dir(), cloR.dir())

    utils.edit_commit(oriR, 'on origin')
    so,se,rc = cloR.exe_cmd_succ('git checkout master')
    utils.edit_commit(cloR, 'on clone')

    so,se,rc = cloR.exe_cmd_succ('git intbr master')

    so,se,rc = cloR.exe_cmd_deny('git ftrbr-start aaa')
    nt.assert_in("Pulling 'master'",                            so)
    nt.assert_in("CONFLICT (content): Merge conflict in a.txt", so)
    nt.assert_not_in("Intbr 'master' not tracked, jump pull.",  so)
    nt.assert_not_in("Creating new ftr branch starting from 'master'", so)