示例#1
0
def remove(name):
    g = Gitolite(os.path.join(os.getcwd(), conf.gitolite_path))
    g.remove_repo(name)
    g.save()
    subprocess.check_call(
        ["sudo", "rm", "-rf", "data/repos/git/repositories/" + name + ".git"],
        cwd=os.getcwd())
示例#2
0
def remove_test_repo(repo_name):
    if not repo_name in _test_repos:
        return
    if not os.path.isdir(wds):
        os.mkdir(wds)
    manager = Gitolite(path=os.path.join(wds, 'gitolite-admin'),
                       url=test_settings['gitolite_url'])
    manager.remove_repo(repo_name)
    manager.save()
    rm('-rf', wds)
    _test_repos.remove(repo_name)
示例#3
0
def remove_test_repos():
    if len(_test_repos) == 0:
        return
    if not os.path.isdir(wds):
        os.mkdir(wds)
    manager = Gitolite(path=os.path.join(wds, 'gitolite-admin'),
                       url=test_settings['gitolite_url'])
    for repo in set(_test_repos):
        manager.remove_repo(repo)
    manager.save()
    rm('-rf', wds)
    _test_repos.clear()