Merge revision 1329 and revision 1330 changes:

- Fix script detection of git checkouts.

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1453@1334 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-07-22 23:48:13 +00:00
parent f34ca16195
commit 32d2876d49
3 changed files with 15 additions and 6 deletions

View File

@ -60,10 +60,12 @@ def write_svn_header(header, chrome_version, cef_version, cpp_header_dir):
year = get_year()
try:
revision = svn.get_revision()
except:
revision = git.get_svn_revision()
if os.path.exists(os.path.join('.', '.svn')):
revision = svn.get_revision()
elif os.path.exists(os.path.join('.', '.git')):
revision = git.get_svn_revision()
else:
raise Exception('Not a valid checkout')
# calculate api hashes
api_hash_calculator = cef_api_hash(cpp_header_dir, verbose = False)