Closed rbgirshick closed 6 years ago
meta: github workaround for stacked diffs seems legit :P
Except that I realized it totally fails as soon as you rebase and all of the hashes change.
There's this workflow https://graysonkoonce.com/stacked-pull-requests-keeping-github-diffs-small/ which is depressingly complex. #iheartphabricatorandhg
Diff bb2a01c
The
CfgNode
constructor can take adict
as an argument that defines that configuration keys and values. However, there were some funky implementation details:dict
as a key value; this shouldn't have been valid because there's no way to tell a nesteddict
from aCfgNode
when serializing and deserializingdict
was passed to the constructor, then it could potentially create an invalidCfgNode
with nesteddict
objects as values because it did not recursively convert these toCfgNode
objects as done in_to_cfg_node
This diff fixes these issues so that a
dict
can be provided to the constructor and nesteddict
s are recursively converted toCfgNode
objects.Diff 68dcec9
Based on feedback, there's a desire to be able to use Python source files to define config overrides. This diff implements the convention that any
.py
file implementing a module with acfg
attribute of typedict
orCfgNode
can be used inload_cfg
(and hence be used a full config or a config override).