345
345
# into the factory for this test - just make the test ui factory
346
346
# pun as a reporter. Then we can check the ordering is right.
347
347
tree.commit('second post', specific_files=['b'])
348
# 4 steps, the first of which is reported 5 times, once per file
349
# 2 files don't trigger an update, as 'a' and 'c' are not
348
# 4 steps, the first of which is reported 2 times, once per dir
351
349
self.assertEqual(
352
[('update', 1, 4, 'Collecting changes [Entry 0/?] - Stage'),
353
('update', 1, 4, 'Collecting changes [Entry 1/4] - Stage'),
354
('update', 1, 4, 'Collecting changes [Entry 2/4] - Stage'),
355
('update', 1, 4, 'Collecting changes [Entry 3/4] - Stage'),
356
('update', 1, 4, 'Collecting changes [Entry 4/4] - Stage'),
350
[('update', 1, 4, 'Collecting changes [Directory 0] - Stage'),
351
('update', 1, 4, 'Collecting changes [Directory 1] - Stage'),
357
352
('update', 2, 4, 'Saving data locally - Stage'),
358
353
('update', 3, 4, 'Updating the working tree - Stage'),
359
354
('update', 4, 4, 'Running post commit hooks - Stage')],
374
369
branch.Branch.hooks.name_hook(a_hook, 'hook name')
375
370
tree.commit('first post')
376
371
self.assertEqual(
377
[('update', 1, 4, 'Collecting changes [Entry 0/?] - Stage'),
378
('update', 1, 4, 'Collecting changes [Entry 1/1] - Stage'),
372
[('update', 1, 4, 'Collecting changes [Directory 0] - Stage'),
373
('update', 1, 4, 'Collecting changes [Directory 1] - Stage'),
379
374
('update', 2, 4, 'Saving data locally - Stage'),
380
375
('update', 3, 4, 'Updating the working tree - Stage'),
381
376
('update', 4, 4, 'Running post commit hooks - Stage'),