mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-05 05:04:46 +02:00
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>
This commit is contained in:
parent
8b98c0ecdd
commit
4eace1a8bc
|
@ -110,7 +110,11 @@ def upgrade_history(options, logger):
|
||||||
repodir = os.path.join(fetchdir, urldir)
|
repodir = os.path.join(fetchdir, urldir)
|
||||||
layerdir = os.path.join(repodir, layerbranch.vcs_subdir)
|
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
|
initial = False
|
||||||
since = maintplanbranch.upgrade_date
|
since = maintplanbranch.upgrade_date
|
||||||
since_option = '%s..origin/master' % maintplanbranch.upgrade_rev
|
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,
|
help="Specify initial date for importing recipe upgrades (default '%s')" % DEFAULT_SINCE_DATE,
|
||||||
action="store", dest="since", default=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",
|
parser.add_option("-d", "--debug",
|
||||||
help = "Enable debug output",
|
help = "Enable debug output",
|
||||||
action="store_const", const=logging.DEBUG, dest="loglevel", default=logging.INFO)
|
action="store_const", const=logging.DEBUG, dest="loglevel", default=logging.INFO)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user