test.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:got 作者: mrozekma 项目源码 文件源码
def git_helper(self):
        self.addHost('daemon', 'host', 'http://localhost', 'user', 'pw', force = True)

        r1 = git.Repo.init('repo1')
        Path('repo1/deps.got').write_text("repo2\nrepo3\n")
        r1.index.add(['deps.got'])
        r1.index.commit('Commit')
        with GotRun(['--here', 'host:repo1', 'repo1', '--force']):
            pass

        r2 = git.Repo.init('repo2')
        r2.index.commit('Commit')
        with GotRun(['--here', 'host:repo2', 'repo2', '--force']):
            pass

        r3 = git.Repo.init('repo3')
        r3.index.commit('Commit')
        with GotRun(['--here', 'host:repo3', 'repo3', '--force']):
            pass

        return r1, r2, r3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号