- v.status('Checking if we already have this rev:')
- process = subprocess.run(
- ['git', '-C', channel.git_cachedir, 'cat-file', '-e', channel.git_revision])
- if process.returncode == 0:
- v.status('yes')
- if process.returncode == 1:
- v.status('no')
- v.result(process.returncode == 0 or process.returncode == 1)
- if process.returncode == 1:
- v.status('Fetching ref "%s"' % channel.git_ref)
+ have_rev = False
+ if hasattr(channel, 'git_revision'):
+ v.status('Checking if we already have this rev:')
+ process = subprocess.run(
+ ['git', '-C', channel.git_cachedir, 'cat-file', '-e', channel.git_revision])
+ if process.returncode == 0:
+ v.status('yes')
+ if process.returncode == 1:
+ v.status('no')
+ v.result(process.returncode == 0 or process.returncode == 1)
+ have_rev = process.returncode == 0
+
+ if not have_rev:
+ v.status(
+ 'Fetching ref "%s" from %s' %
+ (channel.git_ref, channel.git_repo))