summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2018-03-28 00:28:21 +1300
committerPaul Eggleton <paul.eggleton@linux.intel.com>2018-05-04 23:57:53 +1200
commit4eace1a8bc63243549942fb1acba16a0665b5cae (patch)
tree5330555fa6963dfd9b649fe2e96938f17779f59c
parent8b98c0ecdd905395abbc452a2af5453a3faea362 (diff)
downloadopenembedded-core-contrib-4eace1a8bc63243549942fb1acba16a0665b5cae.tar.gz
openembedded-core-contrib-4eace1a8bc63243549942fb1acba16a0665b5cae.tar.bz2
openembedded-core-contrib-4eace1a8bc63243549942fb1acba16a0665b5cae.zip
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>
-rwxr-xr-xrrs/tools/rrs_upgrade_history.py10
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)