- Fix identification of SVN revision after picking up incremental changes in the remote CEF Git repository.

- Add support for large zip files in make_distrib.py (issue #1350).

git-svn-id: https://chromiumembedded.googlecode.com/svn/branches/1916@1804 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2014-08-08 12:43:36 +00:00
parent 4c9a985018
commit 03f609cb14
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ def is_checkout(path):
""" Returns true if the path represents a git checkout. """
return os.path.exists(os.path.join(path, '.git'))
def get_hash(path = '.', branch = 'master'):
def get_hash(path = '.', branch = 'HEAD'):
""" Returns the git hash for the specified branch/tag/hash. """
cmd = "git rev-parse %s" % (branch)
result = exec_cmd(cmd, path)
@ -25,7 +25,7 @@ def get_url(path = '.'):
return result['out'].strip()
return 'Unknown'
def get_svn_revision(path = '.', branch = 'master'):
def get_svn_revision(path = '.', branch = 'HEAD'):
""" Returns the SVN revision associated with the specified path and git
branch/tag/hash. """
svn_rev = "None"

View File

@ -17,7 +17,7 @@ import zipfile
def create_archive(input_dir, zip_file):
""" Creates a zip archive of the specified input directory. """
zf = zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED)
zf = zipfile.ZipFile(zip_file, 'w', zipfile.ZIP_DEFLATED, True)
def addDir(dir):
for f in os.listdir(dir):
full_path = os.path.join(dir, f)
@ -387,7 +387,7 @@ if svn.is_checkout(src_dir):
chromium_rev = chromium_info['revision']
elif git.is_checkout(src_dir):
chromium_url = git.get_url(src_dir)
chromium_rev = git.get_hash(src_dir, 'HEAD')
chromium_rev = git.get_hash(src_dir)
else:
raise Exception('Not a valid checkout: %s' % (src_dir))