~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_too_much.py

  • Committer: John Arbash Meinel
  • Date: 2006-06-26 17:04:29 UTC
  • mto: (1711.7.2 win32)
  • mto: This revision was merged to the branch mainline in revision 1822.
  • Revision ID: john@arbash-meinel.com-20060626170429-b3d97d5a0aba2f91
move the revert tests out of test_too_much.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
        self.assertEquals(self.capture('unknowns'), '')
131
131
        self.assertEquals(file('.bzrignore', 'rU').read(), '*.blah\ngarh\n')
132
132
 
133
 
    def test_revert(self):
134
 
        self.runbzr('init')
135
 
 
136
 
        file('hello', 'wt').write('foo')
137
 
        self.runbzr('add hello')
138
 
        self.runbzr('commit -m setup hello')
139
 
 
140
 
        file('goodbye', 'wt').write('baz')
141
 
        self.runbzr('add goodbye')
142
 
        self.runbzr('commit -m setup goodbye')
143
 
 
144
 
        file('hello', 'wt').write('bar')
145
 
        file('goodbye', 'wt').write('qux')
146
 
        self.runbzr('revert hello')
147
 
        self.check_file_contents('hello', 'foo')
148
 
        self.check_file_contents('goodbye', 'qux')
149
 
        self.runbzr('revert')
150
 
        self.check_file_contents('goodbye', 'baz')
151
 
 
152
 
        os.mkdir('revertdir')
153
 
        self.runbzr('add revertdir')
154
 
        self.runbzr('commit -m f')
155
 
        os.rmdir('revertdir')
156
 
        self.runbzr('revert')
157
 
 
158
 
        if has_symlinks():
159
 
            os.symlink('/unlikely/to/exist', 'symlink')
160
 
            self.runbzr('add symlink')
161
 
            self.runbzr('commit -m f')
162
 
            os.unlink('symlink')
163
 
            self.runbzr('revert')
164
 
            self.failUnlessExists('symlink')
165
 
            os.unlink('symlink')
166
 
            os.symlink('a-different-path', 'symlink')
167
 
            self.runbzr('revert')
168
 
            self.assertEqual('/unlikely/to/exist',
169
 
                             os.readlink('symlink'))
170
 
        else:
171
 
            self.log("skipping revert symlink tests")
172
 
        
173
 
        file('hello', 'wt').write('xyz')
174
 
        self.runbzr('commit -m xyz hello')
175
 
        self.runbzr('revert -r 1 hello')
176
 
        self.check_file_contents('hello', 'foo')
177
 
        self.runbzr('revert hello')
178
 
        self.check_file_contents('hello', 'xyz')
179
 
        os.chdir('revertdir')
180
 
        self.runbzr('revert')
181
 
        os.chdir('..')
182
 
 
183
133
    def test_mv_modes(self):
184
134
        """Test two modes of operation for mv"""
185
135
        self.runbzr('init')