view cloneAll.py @ 2:7cd7c2bb65d0

Script to download all sources review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-June/023528.html reviewed-by: jerboaa
author Mario Torre <neugens.limasoftware@gmail.com>
date Thu, 08 Jun 2017 14:02:14 +0200
parents
children
line wrap: on
line source

#!/bin/python
import subprocess

PATHS = ["agent", "web-gateway", "web-client"]

def getRepo():
    hgrc  = open(".hg/hgrc", "r")
    for repository in hgrc:
        if "default" in repository:
            return repository.split("=")[1].strip()
    return ""

if __name__ == "__main__":
    repo = getRepo()
    for path in PATHS:
        subprocess.call(["hg", "clone", repo + "/" + path])