Beispiel #1
0
    def invokeGit(self, workspace, scm):
        spec = MagicMock(workspaceWorkspacePath=workspace, envWhiteList=set())
        invoker = Invoker(spec, False, True, True, True, True, False)
        run(scm.invoke(invoker))

        log = subprocess.check_output(
            ["git", "log", "--oneline"],
            cwd=workspace,
            universal_newlines=True).strip().split("\n")

        branches = subprocess.check_output(
            ["git", "branch", "-r"], cwd=workspace,
            universal_newlines=True).strip().split("\n")
        branches = set(b.strip() for b in branches)

        return (len(log), branches)
Beispiel #2
0
 def invokeScm(self, workspace, scm):
     spec = MagicMock(workspaceWorkspacePath=workspace, envWhiteList=set())
     invoker = Invoker(spec, False, True, True, True, True, False)
     run(scm.invoke(invoker))