From: Thierry Parmentelat Date: Fri, 3 Apr 2015 08:26:59 +0000 (+0200) Subject: module-tools & git clone : specify --depth only when necessary X-Git-Tag: 5.3.8 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1f91236d83fb7d5aec6ac6832ad3f6fa67c36ed9;hp=d6f9fd163b2e16c123174389b62e9816d2a8109a;p=build.git module-tools & git clone : specify --depth only when necessary Merge branch 'master' of ssh://git.onelab.eu/git/build --- diff --git a/lxc-tags.mk b/lxc-tags.mk index aaa4680f..97f99a90 100644 --- a/lxc-tags.mk +++ b/lxc-tags.mk @@ -9,7 +9,7 @@ planetlab-umts-tools-GITPATH := git://git.onelab.eu/planetlab-umts-tools.git@ nodeupdate-GITPATH := git://git.onelab.eu/nodeupdate.git@nodeupdate-0.5-11 PingOfDeath-GITPATH := git://git.onelab.eu/pingofdeath.git@PingOfDeath-2.2-1 plnode-utils-GITPATH := git://git.onelab.eu/plnode-utils.git@plnode-utils-0.2-2 -nodemanager-GITPATH := git://git.onelab.eu/nodemanager.git@master +nodemanager-GITPATH := git://git.onelab.eu/nodemanager.git@nodemanager-5.2-16 # pl_sshd-GITPATH := git://git.onelab.eu/pl_sshd.git@pl_sshd-1.0-11 codemux-GITPATH := git://git.onelab.eu/codemux.git@codemux-0.1-15 diff --git a/module-tools.py b/module-tools.py index 58f7b85f..aed29e34 100755 --- a/module-tools.py +++ b/module-tools.py @@ -280,9 +280,10 @@ class GitRepository: return line.split()[2] @classmethod - def clone(cls, remote, local, options, depth=0): + def clone(cls, remote, local, options, depth=None): Command("rm -rf %s" % local, options).run_silent() - Command("git clone --depth %d %s %s" % (depth, remote, local), options).run_fatal() + depth_option = "" if depth is None else " --depth {}".format(depth) + Command("git clone{} {} {}".format(depth_option, remote, local), options).run_fatal() return GitRepository(local, options) @classmethod diff --git a/onelab-tags.mk b/onelab-tags.mk index 623f6f15..9f4ad6e3 100644 --- a/onelab-tags.mk +++ b/onelab-tags.mk @@ -17,7 +17,7 @@ util-vserver-pl-GITPATH := git://git.onelab.eu/util-vserver-pl.git@util- nodeupdate-GITPATH := git://git.onelab.eu/nodeupdate.git@nodeupdate-0.5-11 PingOfDeath-GITPATH := git://git.onelab.eu/pingofdeath.git@PingOfDeath-2.2-1 plnode-utils-GITPATH := git://git.onelab.eu/plnode-utils.git@plnode-utils-0.2-2 -nodemanager-GITPATH := git://git.onelab.eu/nodemanager.git@master +nodemanager-GITPATH := git://git.onelab.eu/nodemanager.git@nodemanager-5.2-16 pl_sshd-GITPATH := git://git.onelab.eu/pl_sshd.git@pl_sshd-1.0-11 codemux-GITPATH := git://git.onelab.eu/codemux.git@codemux-0.1-15 fprobe-ulog-GITPATH := git://git.onelab.eu/fprobe-ulog.git@fprobe-ulog-1.1.4-3