# HG changeset patch # User Jeff Hammel # Date 1372324420 25200 # Node ID eeff298cc922699b4e0f879712bfbb6fdd483d75 # Parent 971e7deca495368bb699b4d3ee696f438053bbca more crap diff -r 971e7deca495 -r eeff298cc922 python/hgrc.py --- a/python/hgrc.py Thu Jun 27 02:01:32 2013 -0700 +++ b/python/hgrc.py Thu Jun 27 02:13:40 2013 -0700 @@ -57,6 +57,14 @@ assert os.path.isfile(path), "%s is not a file, exiting" % path hgrc.append(path) + # construct ConfigParser objects and + # ensure that all the files are parseable + config = {} + for path in hgrc: + config['path'] = ConfigParser() + if isinstance(path, basestring): + config['path'].read(path) + if options.print: # print the chosen hgrc paths and you're done print '\n'.join(hgrc)