support multi-line query strings

Replace newlines with spaces so that multiline query strings can go in
the first line of the review list file.

Change-Id: Ib9b54b48f7856101af758a8de98764102781b72e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-05-02 13:31:07 -04:00
parent 14c9ef9f3f
commit a55dd5bc2c

View File

@ -94,6 +94,7 @@ class QueryChanges(command.Command):
break
with open(parsed_args.review_list, 'w', encoding='utf-8') as f:
f.write('# QUERY: {}\n'.format(parsed_args.query_string))
f.write('# QUERY: {}\n'.format(
parsed_args.query_string.replace('\n', ' ')))
for rid in sorted(review_ids):
f.write('{}\n'.format(rid))