# HG changeset patch # User Doug Simon # Date 1381964713 -7200 # Node ID d08accd5892573d2141820465dd93b2d5f1b2171 # Parent ce4836e0212d05f3f0b4ec3a6fbe711fc3eaff26 added support for wrapping long lines in mx/projects by placing a "\" at the end of the line (like the C preprocessor accepts) diff -r ce4836e0212d -r d08accd58925 mxtool/mx.py --- a/mxtool/mx.py Wed Oct 16 18:27:28 2013 +0200 +++ b/mxtool/mx.py Thu Oct 17 01:05:13 2013 +0200 @@ -526,8 +526,15 @@ raise KeyError with open(projectsFile) as f: + prefix = '' for line in f: 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] != '#': key, value = line.split('=', 1)