aboutsummaryrefslogtreecommitdiffstats
path: root/rrs/tools/rrs_maintainer_history.py
diff options
context:
space:
mode:
Diffstat (limited to 'rrs/tools/rrs_maintainer_history.py')
-rwxr-xr-xrrs/tools/rrs_maintainer_history.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/rrs/tools/rrs_maintainer_history.py b/rrs/tools/rrs_maintainer_history.py
index 19559ec69d..72681be107 100755
--- a/rrs/tools/rrs_maintainer_history.py
+++ b/rrs/tools/rrs_maintainer_history.py
@@ -88,6 +88,8 @@ def maintainer_history(options, logger):
for maintplan in maintplans:
for item in maintplan.maintenanceplanlayerbranch_set.all():
layerbranch = item.layerbranch
+ if options.fullreload and not options.dry_run:
+ RecipeMaintainerHistory.objects.filter(layerbranch=layerbranch).delete()
urldir = str(layerbranch.layer.get_fetch_dir())
repodir = os.path.join(fetchdir, urldir)
layerdir = os.path.join(repodir, layerbranch.vcs_subdir)
@@ -115,7 +117,7 @@ def maintainer_history(options, logger):
author = Maintainer.create_or_update(author_name, author_email)
rms = RecipeMaintainerHistory(title=title, date=date, author=author,
- sha1=commit)
+ sha1=commit, layerbranch=layerbranch)
rms.save()
utils.runcmd("git checkout %s -f" % commit,
@@ -176,7 +178,11 @@ def maintainer_history(options, logger):
if __name__=="__main__":
parser = optparse.OptionParser(usage = """%prog [options]""")
-
+
+ parser.add_option("--fullreload",
+ help="Reload upgrade data from scratch",
+ action="store_true", dest="fullreload", default=False)
+
parser.add_option("-d", "--debug",
help = "Enable debug output",
action="store_const", const=logging.DEBUG, dest="loglevel",