Mercurial > hg > graal-compiler
changeset 18601:676f1800077c
mx: removed unused _read_projects_file function
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 03 Dec 2014 16:02:36 +0100 |
parents | f6ca61099649 |
children | 7d8270532cd9 |
files | mx/mx_graal.py mxtool/mx.py |
diffstat | 2 files changed, 2 insertions(+), 65 deletions(-) [+] |
line wrap: on
line diff
--- a/mx/mx_graal.py Wed Dec 03 14:50:16 2014 +0100 +++ b/mx/mx_graal.py Wed Dec 03 16:02:36 2014 +0100 @@ -2113,7 +2113,7 @@ candidates = mx.findclass(args, logToConsole=False, matcher=lambda s, classname: s == classname or classname.endswith('.' + s) or classname.endswith('$' + s)) if len(candidates) > 0: - candidates = mx.select_items(list(mx.OrderedDict.fromkeys(candidates))) + candidates = mx.select_items(sorted(candidates)) else: # mx.findclass can be mistaken, don't give up yet candidates = args
--- a/mxtool/mx.py Wed Dec 03 14:50:16 2014 +0100 +++ b/mxtool/mx.py Wed Dec 03 16:02:36 2014 +0100 @@ -43,7 +43,7 @@ import shutil, re, xml.dom.minidom import pipes import difflib -from collections import Callable, OrderedDict +from collections import Callable from threading import Thread from argparse import ArgumentParser, REMAINDER from os.path import join, basename, dirname, exists, getmtime, isabs, expandvars, isdir, isfile @@ -788,69 +788,6 @@ else: return None -# TODO: remove this function once all repos have transitioned -# to the new project format -def _read_projects_file(projectsFile): - suite = OrderedDict() - - suite['projects'] = OrderedDict() - suite['libraries'] = OrderedDict() - suite['jrelibraries'] = OrderedDict() - suite['distributions'] = OrderedDict() - - with open(projectsFile) as f: - prefix = '' - lineNum = 0 - - def error(message): - abort(projectsFile + ':' + str(lineNum) + ': ' + message) - - for line in f: - lineNum = lineNum + 1 - line = line.strip() - if line.endswith('\\'): - prefix = prefix + line[:-1] - continue - if len(prefix) != 0: - line = prefix + line - prefix = '' - if len(line) != 0 and line[0] != '#': - if '=' not in line: - error('non-comment line does not contain an "=" character') - key, value = line.split('=', 1) - - parts = key.split('@') - - if len(parts) == 1: - if parts[0] == 'suite': - suite['name'] = value - elif parts[0] == 'mxversion': - suite['mxversion'] = value - else: - error('Single part property must be "suite": ' + key) - - continue - if len(parts) != 3: - error('Property name does not have 3 parts separated by "@": ' + key) - kind, name, attr = parts - if kind == 'project': - m = suite['projects'] - elif kind == 'library': - m = suite['libraries'] - elif kind == 'jrelibrary': - m = suite['jrelibraries'] - elif kind == 'distribution': - m = suite['distributions'] - else: - error('Property name does not start with "project@", "library@" or "distribution@": ' + key) - - attrs = m.get(name) - if attrs is None: - attrs = OrderedDict() - m[name] = attrs - attrs[attr] = value - return suite - def _load_suite_dict(mxDir): suffix = 1