diff options
-rwxr-xr-x | rrs/tools/rrs_upgrade_history.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rrs/tools/rrs_upgrade_history.py b/rrs/tools/rrs_upgrade_history.py index a03b5be2ab..5489ac6156 100755 --- a/rrs/tools/rrs_upgrade_history.py +++ b/rrs/tools/rrs_upgrade_history.py @@ -110,7 +110,11 @@ def upgrade_history(options, logger): repodir = os.path.join(fetchdir, urldir) layerdir = os.path.join(repodir, layerbranch.vcs_subdir) - if maintplanbranch.upgrade_rev and not options.fullreload: + if options.commit: + initial = False + since = options.commit + since_option = '%s^..%s' % (options.commit, options.commit) + elif maintplanbranch.upgrade_rev and not options.fullreload: initial = False since = maintplanbranch.upgrade_date since_option = '%s..origin/master' % maintplanbranch.upgrade_rev @@ -188,6 +192,10 @@ if __name__=="__main__": help="Specify initial date for importing recipe upgrades (default '%s')" % DEFAULT_SINCE_DATE, action="store", dest="since", default=DEFAULT_SINCE_DATE) + parser.add_option("-c", "--commit", + help="Specify a single commit to import (for debugging)", + action="store", dest="commit", default='') + parser.add_option("-d", "--debug", help = "Enable debug output", action="store_const", const=logging.DEBUG, dest="loglevel", default=logging.INFO) |