예제 #1
0
    def pushResults(self, message):
        ""
        branch = self.git.get_branch()

        print3('Pushing results...')
        self.git.add(self.subdir)
        self.git.commit(message)
        resilient_commit_push(self.git)

        return branch
예제 #2
0
def clone_results_repo(giturl, working_directory, branch=None):
    ""
    assert giturl and giturl == giturl.strip()

    if not working_directory:
        working_directory = os.getcwd()

    tmpdir = tempfile.mkdtemp('', 'gitresults_work_clone_', os.getcwd())

    print3('Cloning', giturl, 'into', tmpdir)
    git = clone_repo(giturl, tmpdir, branch='master')

    return git
예제 #3
0
    def createBranchLocation(self,
                             directory_suffix='',
                             epochdate=None,
                             granularity='month'):
        ""
        branch, self.subdir = branch_name_and_directory(
            directory_suffix, epochdate, granularity)

        print3('Using directory', self.subdir, 'on branch', branch)

        rdir = get_results_orphan_branch(self.git, branch, self.subdir)
        assert os.path.isdir(rdir)

        return rdir
예제 #4
0
def check_remove_directory(dirpath):
    ""
    if os.path.exists(dirpath):
        print3('rm -r ' + dirpath)
        shutil.rmtree(dirpath)