# HG changeset patch # User Jeff Hammel # Date 1487555332 28800 # Node ID a5a339b7fd826992d8d687946d7ab457cc5841e9 # Parent aa9a3850ed56b143f6aa1cbc4f60addee4c45055 python 3.5 diff -r aa9a3850ed56 -r a5a339b7fd82 python/hgrc.py --- a/python/hgrc.py Sun Feb 19 17:25:31 2017 -0800 +++ b/python/hgrc.py Sun Feb 19 17:48:52 2017 -0800 @@ -169,7 +169,7 @@ if filter(None, errors.values()): for key, value in errors.items(): if value: - print '%s: %s' % (key, ', '.join(value)) + print ('%s: %s' % (key, ', '.join(value))) parser.exit(1) # construct ConfigParser objects and @@ -186,7 +186,7 @@ # print the chosen hgrc paths if 'list_hgrc' in actions: - print '\n'.join(hgrc) + print ('\n'.join(hgrc)) # remove from actions list actions.pop('list_hgrc', None) @@ -229,13 +229,13 @@ values = [value] else: values.append('+++ %s\n%s' % (path, value)) - print '\n'.join(values) + print ('\n'.join(values)) # write .ini files for path, ini in config.items(): if path in urls: continue - with file(path, 'w') as f: + with open(path, 'w') as f: ini.write(f) if __name__ == '__main__':