diff options
Diffstat (limited to 'git_trace2_event_log.py')
-rw-r--r-- | git_trace2_event_log.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/git_trace2_event_log.py b/git_trace2_event_log.py index fe34092a..8c33d80b 100644 --- a/git_trace2_event_log.py +++ b/git_trace2_event_log.py | |||
@@ -132,6 +132,21 @@ class EventLog(object): | |||
132 | exit_event['code'] = result | 132 | exit_event['code'] = result |
133 | self._log.append(exit_event) | 133 | self._log.append(exit_event) |
134 | 134 | ||
135 | def DefParamRepoEvents(self, config): | ||
136 | """Append a 'def_param' event for each repo.* config key to the current log. | ||
137 | |||
138 | Args: | ||
139 | config: Repo configuration dictionary | ||
140 | """ | ||
141 | # Only output the repo.* config parameters. | ||
142 | repo_config = {k: v for k, v in config.items() if k.startswith('repo.')} | ||
143 | |||
144 | for param, value in repo_config.items(): | ||
145 | def_param_event = self._CreateEventDict('def_param') | ||
146 | def_param_event['param'] = param | ||
147 | def_param_event['value'] = value | ||
148 | self._log.append(def_param_event) | ||
149 | |||
135 | def _GetEventTargetPath(self): | 150 | def _GetEventTargetPath(self): |
136 | """Get the 'trace2.eventtarget' path from git configuration. | 151 | """Get the 'trace2.eventtarget' path from git configuration. |
137 | 152 | ||