mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Change CEF version number format to remove SVN dependency (issue #1580).
This commit is contained in:
@ -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. """
|
||||
|
Reference in New Issue
Block a user