Show More
@@ -18,7 +18,6 Data depends on type. | |||||
18 | """ |
|
18 | """ | |
19 |
|
19 | |||
20 | from mercurial.node import nullrev |
|
20 | from mercurial.node import nullrev | |
21 | import re |
|
|||
22 |
|
21 | |||
23 | CHANGESET = 'C' |
|
22 | CHANGESET = 'C' | |
24 |
|
23 | |||
@@ -87,17 +86,14 def colored(dag, repo): | |||||
87 | config = {} |
|
86 | config = {} | |
88 |
|
87 | |||
89 | for key, val in repo.ui.configitems('graph'): |
|
88 | for key, val in repo.ui.configitems('graph'): | |
90 |
if '.' |
|
89 | if '.' in key: | |
91 | continue |
|
|||
92 | branch, setting = key.rsplit('.', 1) |
|
90 | branch, setting = key.rsplit('.', 1) | |
93 | gdict = config.setdefault(branch, {}) |
|
|||
94 |
|
||||
95 | # Validation |
|
91 | # Validation | |
96 |
if |
|
92 | if setting == "width" and val.isdigit(): | |
97 | (setting == "color" and re.match('^[0-9a-fA-F]{6}$', val))): |
|
93 | config.setdefault(branch, {})[setting] = val | |
98 |
|
|
94 | elif setting == "color" and val.isalnum(): | |
99 | else: |
|
95 | config.setdefault(branch, {})[setting] = val | |
100 | continue |
|
96 | ||
101 |
|
97 | |||
102 | for (cur, type, data, parents) in dag: |
|
98 | for (cur, type, data, parents) in dag: | |
103 |
|
99 |
General Comments 0
You need to be logged in to leave comments.
Login now