Merge pull request #122 from harlowja/master
Fix git command references!
This commit is contained in:
commit
5cfec413fe
@ -91,6 +91,8 @@ class Distro(object):
|
||||
run_over_keys = acutal_keys[0:-1]
|
||||
end_key = acutal_keys[-1]
|
||||
quiet = kargs.get('quiet', False)
|
||||
LOG.debug("Running over keys (%s)" % (", ".join(run_over_keys)))
|
||||
LOG.debug("End key is (%s)" % (end_key))
|
||||
for k in run_over_keys:
|
||||
if quiet:
|
||||
root = root.get(k)
|
||||
@ -98,10 +100,13 @@ class Distro(object):
|
||||
return None
|
||||
else:
|
||||
root = root[k]
|
||||
end_value = None
|
||||
if not quiet:
|
||||
return root[end_key]
|
||||
end_value = root[end_key]
|
||||
else:
|
||||
return root.get(end_key)
|
||||
end_value = root.get(end_key)
|
||||
LOG.debug("Retrieved end command: %s", end_value)
|
||||
return end_value
|
||||
|
||||
def known_component(self, name):
|
||||
return name in self._components
|
||||
|
@ -49,7 +49,7 @@ class GitDownloader(Downloader):
|
||||
dirsmade = list()
|
||||
if sh.isdir(self.store_where):
|
||||
LOG.info("Updating using git: located at %r" % (self.store_where))
|
||||
cmd = self.distro.get_command('git', 'checkout')
|
||||
cmd = list(self.distro.get_command('git', 'checkout'))
|
||||
cmd += [GIT_MASTER_BRANCH]
|
||||
sh.execute(*cmd, cwd=self.store_where)
|
||||
cmd = self.distro.get_command('git', 'pull')
|
||||
@ -57,12 +57,12 @@ class GitDownloader(Downloader):
|
||||
else:
|
||||
LOG.info("Downloading using git: %r to %r" % (self.uri, self.store_where))
|
||||
dirsmade.extend(sh.mkdirslist(self.store_where))
|
||||
cmd = self.distro.get_command('git', 'clone')
|
||||
cmd = list(self.distro.get_command('git', 'clone'))
|
||||
cmd += [self.uri, self.store_where]
|
||||
sh.execute(*cmd)
|
||||
if self.branch and self.branch != GIT_MASTER_BRANCH:
|
||||
LOG.info("Adjusting branch using git: %r" % (self.branch))
|
||||
cmd = self.distro.get_command('git', 'checkout')
|
||||
cmd = list(self.distro.get_command('git', 'checkout'))
|
||||
cmd += [self.branch]
|
||||
sh.execute(*cmd, cwd=self.store_where)
|
||||
return dirsmade
|
||||
|
Loading…
Reference in New Issue
Block a user