コード例 #1
0
    def export(cls, revision, path):
        url = revision["fetch_url"]
        commit = revision["commit"]
        path_, dirname = os.path.split(path)
        gitdir = os.path.join(path, ".git")

        os.chdir(path_)
        git.clone(url, dirname)
        os.chdir(path)
        git.checkout(commit)
        rmtree(gitdir)
コード例 #2
0
ファイル: git.py プロジェクト: rvsiy/rez
    def export(cls, revision, path):
        url = revision["fetch_url"]
        commit = revision["commit"]
        path_, dirname = os.path.split(path)
        gitdir = os.path.join(path, ".git")

        os.chdir(path_)
        git.clone(url, dirname)
        os.chdir(path)
        git.checkout(commit)
        rmtree(gitdir)