equal
deleted
inserted
replaced
1 #!/usr/bin/env python |
1 #!/usr/bin/env python |
2 |
2 |
3 from mercurial import ui, util |
3 from mercurial import ui, util, commands |
4 |
4 |
5 testui = ui.ui() |
5 testui = ui.ui() |
6 testui.updateopts(config=[ |
6 parsed = commands.parseconfig([ |
7 'values.string=string value', |
7 'values.string=string value', |
8 'values.bool1=true', |
8 'values.bool1=true', |
9 'values.bool2=false', |
9 'values.bool2=false', |
10 'lists.list1=foo', |
10 'lists.list1=foo', |
11 'lists.list2=foo bar baz', |
11 'lists.list2=foo bar baz', |
15 'interpolation.value2=%(value1)s world', |
15 'interpolation.value2=%(value1)s world', |
16 'interpolation.value3=%(novalue)s', |
16 'interpolation.value3=%(novalue)s', |
17 'interpolation.value4=%(bad)1', |
17 'interpolation.value4=%(bad)1', |
18 'interpolation.value5=%bad2', |
18 'interpolation.value5=%bad2', |
19 ]) |
19 ]) |
|
20 testui.updateopts(config=parsed) |
20 |
21 |
21 print repr(testui.configitems('values')) |
22 print repr(testui.configitems('values')) |
22 print repr(testui.configitems('lists')) |
23 print repr(testui.configitems('lists')) |
23 try: |
24 try: |
24 print repr(testui.configitems('interpolation')) |
25 print repr(testui.configitems('interpolation')) |