~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf_tests.py

  • Committer: Aaron Bentley
  • Date: 2005-11-19 20:23:18 UTC
  • mto: This revision was merged to the branch mainline in revision 288.
  • Revision ID: aaron.bentley@utoronto.ca-20051119202318-949ba01504dc8b52
Updates to match API changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        # Create a test file and commit it
32
32
        file('test_file', 'w').write(self.ORIGINAL)
33
33
        b.add('test_file')
34
 
        b.commit(message='add test_file')
 
34
        b.working_tree().commit(message='add test_file')
35
35
 
36
36
        # Modify the test file
37
37
        file('test_file', 'w').write(self.MODIFIED)
71
71
        # Create a test file and commit it
72
72
        file('test_file', 'w').write(self.ORIGINAL)
73
73
        b.add('test_file')
74
 
        b.commit(message='add test_file')
 
74
        b.working_tree().commit(message='add test_file')
75
75
 
76
76
        # Shelve the changes
77
77
        self.run_bzr('shelve', '--all')
86
86
        # Create a test file and commit it
87
87
        file('test_file', 'w').write(self.ORIGINAL)
88
88
        b.add('test_file')
89
 
        b.commit(message='add test_file')
 
89
        b.working_tree().commit(message='add test_file')
90
90
 
91
91
        # Modify the test file and commit it
92
92
        file('test_file', 'w').write(self.MODIFIED)
93
 
        b.commit(message='update test_file')
 
93
        b.working_tree().commit(message='update test_file')
94
94
 
95
95
        # Shelve the changes
96
96
        self.run_bzr('shelve', '-r', '1', '--all', retcode=1)
116
116
        (stdout, stderr) = self.run_bzr_captured(cmd.split(), retcode=None)
117
117
 
118
118
        self.assertEqual(stderr.split('\n')[0],
119
 
            'bzr: ERROR: shelve only accepts a single revision parameter.')
 
119
            'bzr: ERROR: bzrlib.errors.BzrCommandError: shelve only accepts a single revision parameter.')
120
120
 
121
121
    def test_shelf_with_whitespace(self):
122
122
        """Shows that bzr doesn't handle whitespace well"""