From 5587ccbd2d2fa48e6679e4c6f0ea4628bc84cd54 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 8 Aug 2014 12:25:11 +0000 Subject: [PATCH] Fix automate-git.py to pick up incremental changes in the remote CEF Git repository. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1799 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tools/automate/automate-git.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/automate/automate-git.py b/tools/automate/automate-git.py index e04a5b12d..c4c3355e9 100644 --- a/tools/automate/automate-git.py +++ b/tools/automate/automate-git.py @@ -606,7 +606,7 @@ msg("CEF Source Directory: %s" % (cef_dir)) if options.checkout == '': # Use the CEF head revision. if cef_use_git: - cef_checkout = 'master' + cef_checkout = 'origin/master' else: cef_checkout = get_svn_info(cef_url)['revision'] else: @@ -637,6 +637,11 @@ if not options.dryrun: if not options.noupdate and os.path.exists(cef_dir): if cef_use_git: cef_current_hash = get_git_hash(cef_dir, 'HEAD') + + if not cef_checkout_new: + # Fetch new sources. + run('%s fetch' % (git_exe), cef_dir, depot_tools_dir) + cef_desired_hash = get_git_hash(cef_dir, cef_checkout) cef_checkout_changed = cef_checkout_new or force_change or \ cef_current_hash != cef_desired_hash @@ -649,10 +654,6 @@ if not options.noupdate and os.path.exists(cef_dir): (get_git_svn_revision(cef_dir, cef_desired_hash))) if cef_checkout_changed: - if not cef_checkout_new: - # Fetch new sources. - run('%s fetch' % (git_exe), cef_dir, depot_tools_dir) - # Checkout the requested branch. run('%s checkout %s%s' % (git_exe, ('--force ' if options.forceclean else ''), cef_checkout), \