354
354
# into the factory for this test - just make the test ui factory
355
355
# pun as a reporter. Then we can check the ordering is right.
356
356
tree.commit('second post', specific_files=['b'])
357
# 4 steps, the first of which is reported 5 times, once per file
358
# 2 files don't trigger an update, as 'a' and 'c' are not
357
# 4 steps, the first of which is reported 2 times, once per dir
360
358
self.assertEqual(
361
[('update', 1, 4, 'Collecting changes [Entry 0/?] - Stage'),
362
('update', 1, 4, 'Collecting changes [Entry 1/4] - Stage'),
363
('update', 1, 4, 'Collecting changes [Entry 2/4] - Stage'),
364
('update', 1, 4, 'Collecting changes [Entry 3/4] - Stage'),
365
('update', 1, 4, 'Collecting changes [Entry 4/4] - Stage'),
359
[('update', 1, 4, 'Collecting changes [Directory 0] - Stage'),
360
('update', 1, 4, 'Collecting changes [Directory 1] - Stage'),
366
361
('update', 2, 4, 'Saving data locally - Stage'),
367
362
('update', 3, 4, 'Updating the working tree - Stage'),
368
363
('update', 4, 4, 'Running post commit hooks - Stage')],
383
378
branch.Branch.hooks.name_hook(a_hook, 'hook name')
384
379
tree.commit('first post')
385
380
self.assertEqual(
386
[('update', 1, 4, 'Collecting changes [Entry 0/?] - Stage'),
387
('update', 1, 4, 'Collecting changes [Entry 1/1] - Stage'),
381
[('update', 1, 4, 'Collecting changes [Directory 0] - Stage'),
382
('update', 1, 4, 'Collecting changes [Directory 1] - Stage'),
388
383
('update', 2, 4, 'Saving data locally - Stage'),
389
384
('update', 3, 4, 'Updating the working tree - Stage'),
390
385
('update', 4, 4, 'Running post commit hooks - Stage'),