~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/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:
124
124
        wt.rename_one('hello.txt', 'subdir/hello.txt')
125
125
        out, err = self.run_bzr('commit -m renamed')
126
126
        self.assertEqual('', out)
127
 
        self.assertContainsRe(err, '^Committing to: .*\n'
128
 
                              'added subdir\n'
129
 
                              'renamed hello\.txt => subdir/hello\.txt\n'
130
 
                              'Committed revision 2\.\n$')
 
127
        self.assertEqual(set([
 
128
            'Committing to: %s/' % osutils.getcwd(),
 
129
            'added subdir',
 
130
            'renamed hello.txt => subdir/hello.txt',
 
131
            'Committed revision 2.',
 
132
            '',
 
133
            ]), set(err.split('\n')))
131
134
 
132
135
    def test_verbose_commit_with_unknown(self):
133
136
        """Unknown files should not be listed by default in verbose output"""
220
223
        os.chdir('this')
221
224
        out,err = self.run_bzr('commit -m added')
222
225
        self.assertEqual('', out)
223
 
        expected = '%s/' % (osutils.getcwd(), )
224
 
        self.assertEqualDiff(
225
 
            'Committing to: %s\n'
226
 
            'modified filetomodify\n'
227
 
            'added newdir\n'
228
 
            'added newfile\n'
229
 
            'renamed dirtorename => renameddir\n'
230
 
            'renamed filetorename => renamedfile\n'
231
 
            'renamed dirtoreparent => renameddir/reparenteddir\n'
232
 
            'renamed filetoreparent => renameddir/reparentedfile\n'
233
 
            'deleted dirtoremove\n'
234
 
            'deleted filetoremove\n'
235
 
            'Committed revision 2.\n' % (expected, ),
236
 
            err)
 
226
        self.assertEqual(set([
 
227
            'Committing to: %s/' % osutils.getcwd(),
 
228
            'modified filetomodify',
 
229
            'added newdir',
 
230
            'added newfile',
 
231
            'renamed dirtorename => renameddir',
 
232
            'renamed filetorename => renamedfile',
 
233
            'renamed dirtoreparent => renameddir/reparenteddir',
 
234
            'renamed filetoreparent => renameddir/reparentedfile',
 
235
            'deleted dirtoremove',
 
236
            'deleted filetoremove',
 
237
            'Committed revision 2.',
 
238
            ''
 
239
            ]), set(err.split('\n')))
237
240
 
238
241
    def test_empty_commit_message(self):
239
242
        tree = self.make_branch_and_tree('.')