clone 718536 -1
retitle -1 gbp.conf support multiple filter options
severity -1 wishlist
thanks

Hi Christian,
On Sat, Mar 08, 2014 at 09:34:24PM +0100, Christian Kastner wrote:
> tag 718536 + confirmed patch
> found 718536 0.6.10
> thanks
> 
> The problem is that by default, ConfigParser uses a dict (OrderDict in
> 2.7) as a backing store, so specifying an option more than once per
> section results in the values being overwritten instead of combined as
> gbp.conf(5) says.

I do wonder how this ended up there since I'm sure this was never
supported. I've removed the wrong docs for now.

> The attached patch 0001-* extends the config unit tests with such a
> case; you can observe that the test fails.
> 
> Patch 0002-* implements a custom dict that overrides __setitem__ and
> squashes the value of reapeated option occurrences into one value, as if
> it had been specified as a Python list following gbp.conf(5). This has
> to be enabled to be effective, and currently it is only enable for the
> 'filter' option.
> 
> The simpler alternative of course would be what Diane proposed: keep the
> code as-is, and just fix the man page. I believe this would also be
> cleaner code-wise. However, the ability of multiple filter options can
> make gbp.conf more readable, especially when you need to filter quite a
> few files for DFSG purposes.

Agreed. We're currently about to rework the config parser stuff (Markus
already sent patches for this) so we should revisit that at a later
point so I'll turn this into a wishlist bug to extend the gbp.conf
parser. Thanks a lot for the patch!
Cheers,
  -- Guido


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to