aboutsummaryrefslogtreecommitdiff
path: root/grok-cron.py
diff options
context:
space:
mode:
authorAndy Doan <andy.doan@linaro.org>2015-03-13 12:15:24 -0500
committerLinaro Code Review <review@review.linaro.org>2015-03-17 16:01:55 +0000
commit99543a5c13d1d2807dad0d66543ff9f91a76f3fb (patch)
tree513241405501befdc07410ab316a16793033d1af /grok-cron.py
parent03f034d085432abaa702506efd3da681d173ff07 (diff)
grok/gitolite fix: update manifest when description is changed
gitolite doesn't have a trigger for repo description changes. However, it does search for local commands *before* the gitolite supported commands. With this change we execute the desc command and then update the manifest if needed This also cleans up an old hack we had to keep this up-to-date Change-Id: I859ce86d45e9fca65fb5b9960d8377a61cd12261
Diffstat (limited to 'grok-cron.py')
-rwxr-xr-xgrok-cron.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/grok-cron.py b/grok-cron.py
index 419f8fb..cc0b464 100755
--- a/grok-cron.py
+++ b/grok-cron.py
@@ -26,19 +26,11 @@ def main(manifile, repo_dir, dryrun):
g = os.path.join(repo_dir, repo)
gde = os.path.join(g, 'git-daemon-export-ok')
- desc = os.path.join(g, 'description')
if not os.path.exists(g) or not os.path.exists(gde):
log.info("Removing %s from manifest...", repo)
del manifest[repo]
changed = True
- elif os.path.exists(desc):
- with open(desc) as f:
- desc = f.read().strip()
- if manifest[repo].get('description') != desc:
- log.info('Updating description for: %s', repo)
- manifest[repo]['description'] = desc
- changed = True
if changed and not dryrun:
grokmirror.write_manifest(manifile, manifest)