From 828d2f68b29f82901c698cf96d49c69abb46391d Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 8 Aug 2014 12:40:16 +0000 Subject: [PATCH] Fix identification of SVN revision after picking up incremental changes in the remote CEF Git repository. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1802 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- tools/git_util.py | 4 ++-- tools/make_distrib.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/git_util.py b/tools/git_util.py index 62c9d6774..91e495959 100644 --- a/tools/git_util.py +++ b/tools/git_util.py @@ -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" diff --git a/tools/make_distrib.py b/tools/make_distrib.py index bd7b7a116..412836eb0 100644 --- a/tools/make_distrib.py +++ b/tools/make_distrib.py @@ -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))