diff options
Diffstat (limited to 'git_trace2_event_log.py')
| -rw-r--r-- | git_trace2_event_log.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/git_trace2_event_log.py b/git_trace2_event_log.py index 8c33d80b..8f12d1a9 100644 --- a/git_trace2_event_log.py +++ b/git_trace2_event_log.py | |||
| @@ -132,6 +132,18 @@ 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 CommandEvent(self, name, subcommands): | ||
| 136 | """Append a 'command' event to the current log. | ||
| 137 | |||
| 138 | Args: | ||
| 139 | name: Name of the primary command (ex: repo, git) | ||
| 140 | subcommands: List of the sub-commands (ex: version, init, sync) | ||
| 141 | """ | ||
| 142 | command_event = self._CreateEventDict('command') | ||
| 143 | command_event['name'] = name | ||
| 144 | command_event['subcommands'] = subcommands | ||
| 145 | self._log.append(command_event) | ||
| 146 | |||
| 135 | def DefParamRepoEvents(self, config): | 147 | def DefParamRepoEvents(self, config): |
| 136 | """Append a 'def_param' event for each repo.* config key to the current log. | 148 | """Append a 'def_param' event for each repo.* config key to the current log. |
| 137 | 149 | ||
