mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Fix revision.py detection of git checkouts
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1329 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import svn_util as svn
|
import svn_util as svn
|
||||||
import git_util as git
|
import git_util as git
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# cannot be loaded as a module
|
# cannot be loaded as a module
|
||||||
@ -11,9 +12,11 @@ if __name__ != "__main__":
|
|||||||
sys.stderr.write('This file cannot be loaded as a module!')
|
sys.stderr.write('This file cannot be loaded as a module!')
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
try:
|
if os.path.exists(os.path.join('.', '.svn')):
|
||||||
sys.stdout.write(svn.get_revision())
|
sys.stdout.write(svn.get_revision())
|
||||||
except:
|
elif os.path.exists(os.path.join('.', '.git')):
|
||||||
sys.stdout.write(git.get_svn_revision())
|
sys.stdout.write(git.get_svn_revision())
|
||||||
|
else:
|
||||||
|
raise Exception('Not a valid checkout')
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user