SCons: Fix bug with .hg dir not existing.
This commit is contained in:
parent
9e1dc7f205
commit
b8548c011d
1 changed files with 2 additions and 3 deletions
|
@ -211,17 +211,15 @@ If you are actually a M5 developer, please fix this and
|
||||||
run the style hook. It is important.
|
run the style hook. It is important.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
hg_info = "Unknown"
|
||||||
if hgdir.exists():
|
if hgdir.exists():
|
||||||
# 1) Grab repository revision if we know it.
|
# 1) Grab repository revision if we know it.
|
||||||
cmd = "hg id -n -i -t -b"
|
cmd = "hg id -n -i -t -b"
|
||||||
try:
|
try:
|
||||||
hg_info = read_command(cmd, cwd=env.root.abspath).strip()
|
hg_info = read_command(cmd, cwd=env.root.abspath).strip()
|
||||||
except OSError:
|
except OSError:
|
||||||
hg_info = "Unknown"
|
|
||||||
print mercurial_bin_not_found
|
print mercurial_bin_not_found
|
||||||
|
|
||||||
env['HG_INFO'] = hg_info
|
|
||||||
|
|
||||||
# 2) Ensure that the style hook is in place.
|
# 2) Ensure that the style hook is in place.
|
||||||
try:
|
try:
|
||||||
ui = None
|
ui = None
|
||||||
|
@ -240,6 +238,7 @@ if hgdir.exists():
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
print ".hg directory not found"
|
print ".hg directory not found"
|
||||||
|
env['HG_INFO'] = hg_info
|
||||||
|
|
||||||
###################################################
|
###################################################
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue