mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1049893 - Allow mach mercurial-setup to work if no ~/.hgrc exists; r=gps
DONTBUILD (NPOTB) --HG-- extra : rebase_source : 8788d55cd5cfa5e64627d7951209c5f2c1222f0a
This commit is contained in:
parent
9ecd02fd9c
commit
c54d74da9e
@ -42,11 +42,12 @@ class MercurialConfig(object):
|
||||
# Mercurial configuration files allow an %include directive to include
|
||||
# other files, this is not supported by ConfigObj, so throw a useful
|
||||
# error saying this.
|
||||
with open(infile, 'r') as f:
|
||||
for line in f:
|
||||
if line.startswith('%include'):
|
||||
raise HgIncludeException(
|
||||
'%include directive is not supported by MercurialConfig')
|
||||
if os.path.exists(infile):
|
||||
with open(infile, 'r') as f:
|
||||
for line in f:
|
||||
if line.startswith('%include'):
|
||||
raise HgIncludeException(
|
||||
'%include directive is not supported by MercurialConfig')
|
||||
|
||||
# write_empty_values is necessary to prevent built-in extensions (which
|
||||
# have no value) from being dropped on write.
|
||||
|
Loading…
Reference in New Issue
Block a user