Граф коммитов

2 Коммитов

Автор SHA1 Сообщение Дата
Andrew Halberstadt 57887f2601 Bug 1328830 - [manifestparser] Check line continuation before looking for next key, r=jmaher
Currently manifestparser will only look for line continuations *after* looking for a key. This means
that line continuations cannot contain key separators. For example, this:

    [test]
    foo=
      bar=baz

gets treated as:

    {'name': 'test', 'foo': '', 'bar': 'baz'}

Here, bar=baz will be treated as a new key/value pair despite the indentation. This patch switches
the order around, so we look for a continuation first. Now, it is only treated as a continuation if
the indent is greater than the indent of the preceding key.

So this manifest:

    [test]
    foo=bar
      baz=fleem

is a continuation and results in:

    {'name': 'test', 'foo': 'bar\nbaz=fleem'}

But this manifest:

    [test]
      foo=bar
      baz=fleem

is not a continuation, and yields:

    {'name': 'test', 'foo': 'bar', 'baz': 'fleem'}

MozReview-Commit-ID: FAMP5TUIo9q

--HG--
extra : rebase_source : 624c53cfe0565374c1224dd86a3fffc8831279d3
2017-07-19 14:48:01 -04:00
Geoff Brown 7563788551 Bug 1380126 - Add a copy of mozbase' manifestparser to mozharness; r=Callek
--HG--
rename : testing/mozbase/manifestparser/manifestparser/__init__.py => testing/mozharness/manifestparser/__init__.py
rename : testing/mozbase/manifestparser/manifestparser/cli.py => testing/mozharness/manifestparser/cli.py
rename : testing/mozbase/manifestparser/manifestparser/expression.py => testing/mozharness/manifestparser/expression.py
rename : testing/mozbase/manifestparser/manifestparser/filters.py => testing/mozharness/manifestparser/filters.py
rename : testing/mozbase/manifestparser/manifestparser/ini.py => testing/mozharness/manifestparser/ini.py
rename : testing/mozbase/manifestparser/manifestparser/manifestparser.py => testing/mozharness/manifestparser/manifestparser.py
2017-08-02 11:08:29 -06:00