359
359
('update', 4, 4, 'Running post commit hooks - Stage')],
363
def test_commit_progress_shows_hook_names(self):
364
tree = self.make_branch_and_tree('.')
365
# set a progress bar that captures the calls so we can see what is
367
self.old_ui_factory = ui.ui_factory
368
self.addCleanup(self.restoreDefaults)
369
factory = CapturingUIFactory()
370
ui.ui_factory = factory
371
def a_hook(_, _2, _3, _4, _5, _6):
373
branch.Branch.hooks.install_hook('post_commit', a_hook)
374
branch.Branch.hooks.name_hook(a_hook, 'hook name')
375
tree.commit('first post')
377
[('update', 1, 4, 'Collecting changes [Entry 0/?] - Stage'),
378
('update', 1, 4, 'Collecting changes [Entry 1/1] - Stage'),
379
('update', 2, 4, 'Saving data locally - Stage'),
380
('update', 3, 4, 'Updating the working tree - Stage'),
381
('update', 4, 4, 'Running post commit hooks - Stage'),
382
('update', 4, 4, 'Running post commit hooks [hook name] - Stage'),