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:
Marshall Greenblatt 2013-07-22 22:23:54 +00:00
parent a32861ad7b
commit e24a6b02af
1 changed files with 5 additions and 2 deletions

View File

@ -4,6 +4,7 @@
import svn_util as svn
import git_util as git
import os
import sys
# 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.exit()
try:
if os.path.exists(os.path.join('.', '.svn')):
sys.stdout.write(svn.get_revision())
except:
elif os.path.exists(os.path.join('.', '.git')):
sys.stdout.write(git.get_svn_revision())
else:
raise Exception('Not a valid checkout')