Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Issue 9190147: Allow metadata file to inherit values from another configuration file (Closed)

Created:
Jan. 18, 2013, 11:40 a.m. by Wladimir Palant
Modified:
Nov. 6, 2013, 8:52 a.m.
Visibility:
Public.

Description

Allow metadata file to inherit values from another configuration file

Patch Set 1 #

Total comments: 3

Patch Set 2 : Make option source directory available #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -2 lines) Patch
M chainedconfigparser.py View 1 3 chunks +18 lines, -2 lines 0 comments Download

Messages

Total messages: 5
Wladimir Palant
Jan. 18, 2013, 11:40 a.m. (2013-01-18 11:40:22 UTC) #1
Wladimir Palant
I've added Sebastian as reviewer. This is an old change but IMHO it would still ...
Nov. 5, 2013, 11:33 a.m. (2013-11-05 11:33:32 UTC) #2
Sebastian Noack
http://codereview.adblockplus.org/9190147/diff/1/chainedconfigparser.py File chainedconfigparser.py (right): http://codereview.adblockplus.org/9190147/diff/1/chainedconfigparser.py#newcode23 chainedconfigparser.py:23: class ChainedConfigParser: I find this approach slightly overkill. I ...
Nov. 5, 2013, 12:19 p.m. (2013-11-05 12:19:38 UTC) #3
Wladimir Palant
http://codereview.adblockplus.org/9190147/diff/1/chainedconfigparser.py File chainedconfigparser.py (right): http://codereview.adblockplus.org/9190147/diff/1/chainedconfigparser.py#newcode23 chainedconfigparser.py:23: class ChainedConfigParser: On 2013/11/05 12:19:38, sebastian wrote: > I ...
Nov. 5, 2013, 12:45 p.m. (2013-11-05 12:45:38 UTC) #4
Sebastian Noack
Nov. 5, 2013, 1:13 p.m. (2013-11-05 13:13:25 UTC) #5
http://codereview.adblockplus.org/9190147/diff/1/chainedconfigparser.py
File chainedconfigparser.py (right):

http://codereview.adblockplus.org/9190147/diff/1/chainedconfigparser.py#newco...
chainedconfigparser.py:23: class ChainedConfigParser:
On 2013/11/05 12:45:38, Wladimir Palant wrote:
> On 2013/11/05 12:19:38, sebastian wrote:
> > I find this approach slightly overkill. I would prefer something as simple
as
> > following instead:
> 
> That was a consideration of course. However, we need to be able to resolve
> relative paths in configs - basedir isn't fixed, it's rather dependent on the
> config file. Consider the following file foo/metadata:
> 
>   [default]
>   inherit = bar/metadata
>   [mapping]
>   icon.png = icon64.png
> 
> And foo/bar/metadata (typically inside a subrepository):
> 
>   [mapping]
>   contentScript.js = default/contentScript.js
> 
> Whoever writes foo/bar/metadata file shouldn't need to think about files that
> will inherit from it - it's obvious that the relative path
> default/contentScript.js here should be resolved relative to the foo/bar/
> directory. On the other hand, the relative path icon64.png in foo/metadata
file
> should be resolved relative to the foo/ directory.
> 
> I see now that the change that actually allowed retrieving the source
directory
> for each setting was part of a different review. I've added this change here
but
> packager.py is no longer part of the patchset because of that.

Fair enough, LGTM.

Powered by Google App Engine
This is Rietveld