From 8b0993136d91300c39f256bd2c4a297ddadeb01b Mon Sep 17 00:00:00 2001 From: Vojtech Horky Date: Mon, 13 Nov 2017 12:42:56 +0100 Subject: [PATCH] Use Git repositories by default --- build.py | 6 +++--- hbuild/cvs.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 6d673e5..60b51ff 100755 --- a/build.py +++ b/build.py @@ -46,15 +46,15 @@ def create_checkout_task(name, url): if url.startswith("wip://"): return RsyncCheckoutTask(name, url[6:]) else: - return BzrCheckoutTask(name, url) + return GitCheckoutTask(name, url) # Command-line options args = argparse.ArgumentParser(description='HelenOS integration build') -args.add_argument('--helenos-repository', default='bzr://helenos.org/mainline', dest='helenos_repository', +args.add_argument('--helenos-repository', default='https://github.com/HelenOS/helenos.git', dest='helenos_repository', metavar='PATH', help='HelenOS repository path' ) -args.add_argument('--coastline-repository', default='bzr://helenos.org/coastline', dest='coastline_repository', +args.add_argument('--coastline-repository', default='https://github.com/HelenOS/harbours.git', dest='coastline_repository', metavar='PATH', help='Coastline repository path' ) diff --git a/hbuild/cvs.py b/hbuild/cvs.py index b13ddbf..018441c 100755 --- a/hbuild/cvs.py +++ b/hbuild/cvs.py @@ -57,6 +57,17 @@ class BzrCheckoutTask(CvsCheckoutTask): if res['failed']: raise Exception('Bazaar checkout of %s failed.' % self.url) +class GitCheckoutTask(CvsCheckoutTask): + def __init__(self, name, url): + self.name = name + self.url = url + CvsCheckoutTask.__init__(self, repository=url) + + def do_checkout(self, target_directory): + res = self.ctl.run_command(['git', 'clone', '--quiet', self.url, target_directory ]) + if res['failed']: + raise Exception('Git clone of %s failed.' % self.url) + class RsyncCheckoutTask(CvsCheckoutTask): def __init__(self, name, base): self.name = name -- 2.11.4.GIT