~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/versioning.py

  • Committer: Robert Collins
  • Date: 2005-09-30 02:54:51 UTC
  • mfrom: (1395)
  • mto: This revision was merged to the branch mainline in revision 1397.
  • Revision ID: robertc@robertcollins.net-20050930025451-47b9e412202be44b
symlink and weaves, whaddya know

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
                          b.add,
73
73
                          'foo/hello')
74
74
        
75
 
        self.check_and_upgrade()
 
75
        self.check_branch()
76
76
 
77
77
 
78
78
    def test_add_in_unversioned(self):
152
152
        eq(run_bzr(['add']), 0)
153
153
        eq(list(b.unknowns()), [])
154
154
 
155
 
        self.check_and_upgrade()
156
 
 
157
 
 
158
 
    def check_and_upgrade(self):
 
155
        self.check_branch()
 
156
 
 
157
 
 
158
    def check_branch(self):
159
159
        """After all the above changes, run the check and upgrade commands.
160
160
 
161
161
        The upgrade should be a no-op."""
166
166
        from bzrlib.check import check
167
167
        check(b)
168
168
        
169
 
        debug('upgrade branch...')
170
 
        from bzrlib.upgrade import upgrade
171
 
        upgrade(b)
172
 
        
173
 
        debug('check branch...')
174
 
        from bzrlib.check import check
175
 
        check(b)
176
 
        
177
169
 
178
170
        
179
171
class SubdirCommit(TestCaseInTempDir):
197
189
        for fn in ('a/one', 'b/two', 'top'):
198
190
            file(fn, 'w').write('new contents')
199
191
            
 
192
        debug('start selective subdir commit')
200
193
        run_bzr('commit', 'a', '-m', 'commit a only')
201
194
        
202
195
        old = b.revision_tree(b.get_rev_id(1))
222
215
        
223
216
        # TODO: factor out some kind of assert_tree_state() method
224
217
        
 
218
 
 
219
if __name__ == '__main__':
 
220
    import unittest
 
221
    unittest.main()
 
222