示例#1
0
 def merge_head(self, path, ref):
     try:
         repo = Jagare(path)
         ret = repo.merge_head(ref)
         return MergeResultConverter(**ret).convert()
     except Exception as e:
         raise ServiceUnavailable(repr(e))
示例#2
0
 def merge_head(self, path, ref):
     try:
         repo = Jagare(path)
         ret = repo.merge_head(ref)
         return MergeResultConverter(**ret).convert()
     except Exception as e:
         raise ServiceUnavailable(repr(e))
示例#3
0
文件: test_merge.py 项目: CMGS/ellen
    def test_merge_head(self):
        repo = Jagare(self.path)
        BR = 'br_test_merge'
        path = self.get_temp_path()

        # repo has work-tree
        repo.clone(path, branch=BARE_REPO_OTHER_BRANCH)
        repo = Jagare(os.path.join(path, '.git'))

        ret = repo.create_branch(BR, BARE_REPO_OTHER_BRANCH)
        assert ret

        commit_something(path, branch=BR)
        repo.update_head(BARE_REPO_OTHER_BRANCH)
        merge_result = repo.merge_head(BR)
        assert merge_result['is_fastforward']
示例#4
0
    def test_merge_head(self):
        repo = Jagare(self.path)
        BR = 'br_test_merge'
        path = self.get_temp_path()

        # repo has work-tree
        repo.clone(path, branch=BARE_REPO_OTHER_BRANCH)
        repo = Jagare(os.path.join(path, '.git'))

        ret = repo.create_branch(BR, BARE_REPO_OTHER_BRANCH)
        assert ret

        commit_something(path, branch=BR)
        repo.update_head(BARE_REPO_OTHER_BRANCH)
        merge_result = repo.merge_head(BR)
        assert merge_result['is_fastforward']