mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Support less error-prone update of just CEF changes with automate-git.py --force-cef-update (issue #2435)
This commit is contained in:
@ -709,6 +709,11 @@ parser.add_option('--no-cef-update',
|
|||||||
help='Do not update CEF. Pass --force-build or '+\
|
help='Do not update CEF. Pass --force-build or '+\
|
||||||
'--force-distrib if you desire a new build or '+\
|
'--force-distrib if you desire a new build or '+\
|
||||||
'distribution.')
|
'distribution.')
|
||||||
|
parser.add_option('--force-cef-update',
|
||||||
|
action='store_true', dest='forcecefupdate', default=False,
|
||||||
|
help='Force a CEF update. This will cause local changes in '+\
|
||||||
|
'the CEF checkout to be discarded and patch files to '+\
|
||||||
|
'be reapplied.')
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
'--no-chromium-update',
|
'--no-chromium-update',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
@ -1203,6 +1208,7 @@ if not options.nocefupdate and os.path.exists(cef_dir):
|
|||||||
|
|
||||||
cef_desired_hash = get_git_hash(cef_dir, cef_checkout)
|
cef_desired_hash = get_git_hash(cef_dir, cef_checkout)
|
||||||
cef_checkout_changed = cef_checkout_new or force_change or \
|
cef_checkout_changed = cef_checkout_new or force_change or \
|
||||||
|
options.forcecefupdate or \
|
||||||
cef_current_hash != cef_desired_hash
|
cef_current_hash != cef_desired_hash
|
||||||
|
|
||||||
msg("CEF Current Checkout: %s" % (cef_current_hash))
|
msg("CEF Current Checkout: %s" % (cef_current_hash))
|
||||||
@ -1211,7 +1217,9 @@ if not options.nocefupdate and os.path.exists(cef_dir):
|
|||||||
if cef_checkout_changed:
|
if cef_checkout_changed:
|
||||||
# Checkout the requested branch.
|
# Checkout the requested branch.
|
||||||
run('%s checkout %s%s' %
|
run('%s checkout %s%s' %
|
||||||
(git_exe, ('--force ' if options.forceclean else ''), cef_checkout), \
|
(git_exe, \
|
||||||
|
('--force ' if (options.forceclean or options.forcecefupdate) else ''), \
|
||||||
|
cef_checkout), \
|
||||||
cef_dir, depot_tools_dir)
|
cef_dir, depot_tools_dir)
|
||||||
else:
|
else:
|
||||||
cef_checkout_changed = False
|
cef_checkout_changed = False
|
||||||
@ -1380,6 +1388,11 @@ if chromium_checkout_changed:
|
|||||||
|
|
||||||
# Delete the src/out directory created by `gclient sync`.
|
# Delete the src/out directory created by `gclient sync`.
|
||||||
delete_directory(out_src_dir)
|
delete_directory(out_src_dir)
|
||||||
|
elif cef_checkout_changed:
|
||||||
|
# Backup and revert the patched files.
|
||||||
|
run_patch_updater("--backup --revert")
|
||||||
|
# Check and restore the patched files.
|
||||||
|
run_patch_updater("--reapply --restore")
|
||||||
|
|
||||||
# Restore the src/cef directory.
|
# Restore the src/cef directory.
|
||||||
if cef_dir != cef_src_dir and os.path.exists(
|
if cef_dir != cef_src_dir and os.path.exists(
|
||||||
|
Reference in New Issue
Block a user