Change CEF version number format to remove SVN dependency (issue #1580).

This commit is contained in:
Marshall Greenblatt
2015-03-16 19:34:35 -04:00
parent d17dc3e5de
commit 7acecd6b6b
14 changed files with 59 additions and 175 deletions

View File

@ -11,7 +11,7 @@ def is_checkout(path):
def get_hash(path = '.', branch = 'HEAD'):
""" Returns the git hash for the specified branch/tag/hash. """
cmd = "git rev-parse %s" % (branch)
cmd = "git rev-parse %s" % branch
result = exec_cmd(cmd, path)
if result['out'] != '':
return result['out'].strip()
@ -25,18 +25,13 @@ def get_url(path = '.'):
return result['out'].strip()
return 'Unknown'
def get_svn_revision(path = '.', branch = 'HEAD'):
""" Returns the SVN revision associated with the specified path and git
branch/tag/hash. """
svn_rev = "None"
cmd = "git log --grep=^git-svn-id: -n 1 %s" % (branch)
def get_commit_number(path = '.', branch = 'HEAD'):
""" Returns the number of commits in the specified branch/tag/hash. """
cmd = "git rev-list --count %s" % branch
result = exec_cmd(cmd, path)
if result['err'] == '':
for line in result['out'].split('\n'):
if line.find("git-svn-id") > 0:
svn_rev = line.split("@")[1].split()[0]
break
return svn_rev
if result['out'] != '':
return result['out'].strip()
return '0'
def get_changed_files(path = '.'):
""" Retrieves the list of changed files. """