/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to processor.py

dump parameter for info processor

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
        else:
42
42
            (self.working_tree, self.branch) = bzrdir._get_tree_branch()
43
43
            self.repo = self.branch.repository
44
 
        self.params = params
 
44
        if params is None:
 
45
            self.params = []
 
46
        else:
 
47
            self.params = params
 
48
 
45
49
        self.verbose = verbose
46
50
 
47
51
    def process(self, command_iter):
69
73
            except KeyError:
70
74
                raise errors.MissingHandler(cmd.name)
71
75
            else:
72
 
                # TODO: put hooks around processing each command?
 
76
                self.pre_handler(cmd)
73
77
                handler(self, cmd)
 
78
                self.post_handler(cmd)
74
79
        self.post_process()
75
80
 
76
81
    def pre_process(self):
81
86
        """Hook for logic at end of processing."""
82
87
        pass
83
88
 
 
89
    def pre_handler(self, cmd):
 
90
        """Hook for logic before each handler starts."""
 
91
        pass
 
92
 
 
93
    def post_handler(self, cmd):
 
94
        """Hook for logic after each handler finishes."""
 
95
        pass
 
96
 
84
97
    def progress_handler(self, cmd):
85
98
        """Process a ProgressCommand."""
86
99
        raise NotImplementedError(self.progress_handler)