diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-03-28 00:28:21 +1300 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-05-04 23:57:53 +1200 |
commit | 4eace1a8bc63243549942fb1acba16a0665b5cae (patch) | |
tree | 5330555fa6963dfd9b649fe2e96938f17779f59c /rrs/tools/rrs_upgrade_history.py | |
parent | 8b98c0ecdd905395abbc452a2af5453a3faea362 (diff) | |
download | openembedded-core-contrib-4eace1a8bc63243549942fb1acba16a0665b5cae.tar.gz |
rrs_upgrade_history: Add debug option to process specific commit
Sometimes it's useful to be able to re-try processing a particular
commit (generally in conjunction with --dry-run), so add an option to
enable that.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'rrs/tools/rrs_upgrade_history.py')
-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) |