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