Bug 779431 - symbolstore.py ignores SRCSRV_ROOT if hg provides a path. r=:ted

This commit is contained in:
Mark Hammond 2012-08-07 11:32:45 +10:00
parent 7120862890
commit a3204f8cd0

View File

@ -248,13 +248,15 @@ class HGFileInfo(VCSFileInfo):
if not srcdir in HGRepoInfo.repos:
rev = read_output('hg', '-R', srcdir,
'parent', '--template={node|short}')
path = read_output('hg', '-R', srcdir,
'showconfig', 'paths.default')
if path == '':
hg_root = os.environ.get("SRCSRV_ROOT")
if hg_root:
path = hg_root
else:
# Look for the default hg path. If SRVSRV_ROOT is set, we
# don't bother asking hg.
hg_root = os.environ.get("SRCSRV_ROOT")
if hg_root:
path = hg_root
else:
path = read_output('hg', '-R', srcdir,
'showconfig', 'paths.default')
if not path:
print >> sys.stderr, "Failed to get HG Repo for %s" % srcdir
cleanroot = None
if path != '': # not there?