/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 bzrlib/tests/workingtree_implementations/test_commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-30 05:50:28 UTC
  • mfrom: (4183.5.9 commit-uses-ric)
  • Revision ID: pqm@pqm.ubuntu.com-20090330055028-lhmncpzf7ebkd2yc
(robertc) Teach commit to use record_iter_changes for some commits.
        (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
456
456
        self.build_tree(['subtree/file'])
457
457
        subtree.add(['file'], ['file-id'])
458
458
        rev_id = tree.commit('added reference', allow_pointless=False)
 
459
        tree.get_reference_revision(tree.path2id('subtree'))
459
460
        child_revid = subtree.last_revision()
460
461
        # now change the child tree
461
462
        self.build_tree_contents([('subtree/file', 'new-content')])
525
526
        tree.commit('second post', specific_files=['b'])
526
527
        # 5 steps, the first of which is reported 2 times, once per dir
527
528
        self.assertEqual(
528
 
            [('update', 1, 5, 'Collecting changes [Directory 0] - Stage'),
529
 
             ('update', 1, 5, 'Collecting changes [Directory 1] - Stage'),
 
529
            [('update', 1, 5, 'Collecting changes [0] - Stage'),
 
530
             ('update', 1, 5, 'Collecting changes [1] - Stage'),
530
531
             ('update', 2, 5, 'Saving data locally - Stage'),
531
532
             ('update', 3, 5, 'Running pre_commit hooks - Stage'),
532
533
             ('update', 4, 5, 'Updating the working tree - Stage'),
548
549
                                               'hook name')
549
550
        tree.commit('first post')
550
551
        self.assertEqual(
551
 
            [('update', 1, 5, 'Collecting changes [Directory 0] - Stage'),
552
 
             ('update', 1, 5, 'Collecting changes [Directory 1] - Stage'),
 
552
            [('update', 1, 5, 'Collecting changes [0] - Stage'),
 
553
             ('update', 1, 5, 'Collecting changes [1] - Stage'),
553
554
             ('update', 2, 5, 'Saving data locally - Stage'),
554
555
             ('update', 3, 5, 'Running pre_commit hooks - Stage'),
555
556
             ('update', 4, 5, 'Updating the working tree - Stage'),
573
574
                                               'hook name')
574
575
        tree.commit('first post')
575
576
        self.assertEqual(
576
 
            [('update', 1, 5, 'Collecting changes [Directory 0] - Stage'),
577
 
             ('update', 1, 5, 'Collecting changes [Directory 1] - Stage'),
 
577
            [('update', 1, 5, 'Collecting changes [0] - Stage'),
 
578
             ('update', 1, 5, 'Collecting changes [1] - Stage'),
578
579
             ('update', 2, 5, 'Saving data locally - Stage'),
579
580
             ('update', 3, 5, 'Running pre_commit hooks - Stage'),
580
581
             ('update', 3, 5, 'Running pre_commit hooks [hook name] - Stage'),