~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox.py

  • Committer: Martin Pool
  • Date: 2005-09-16 03:32:44 UTC
  • mfrom: (1185.1.23)
  • mto: (1185.8.2) (974.1.91)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050916033244-18c4f4bcba663e42
- merge in many integration fixes from Robert

  * xml escaping of unprintable characters

  * 'make clean'

  * new, more consistent Branch constructors 

  * RemoteBranch tests against local farmework

  * scott's non-verbose commit fix 

This seems to break this usage though 

  bzr diff -r 1207..1208 ../bzr.robertc-integration

robertc@robertcollins.net-20050915175953-a16fdc627ce7c541

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
    def test_ignore_patterns(self):
94
94
        from bzrlib.branch import Branch
95
95
        
96
 
        b = Branch('.', init=True)
 
96
        b = Branch.initialize('.')
97
97
        self.assertEquals(list(b.unknowns()), [])
98
98
 
99
99
        file('foo.tmp', 'wt').write('tmp files are ignored')
147
147
        os.rmdir('revertdir')
148
148
        self.runbzr('revert')
149
149
 
150
 
    def skipped_test_mv_modes(self):
 
150
    def test_mv_modes(self):
151
151
        """Test two modes of operation for mv"""
152
152
        from bzrlib.branch import Branch
153
 
        b = Branch('.', init=True)
 
153
        b = Branch.initialize('.')
154
154
        self.build_tree(['a', 'c', 'subdir/'])
 
155
        self.run_bzr('add', self.test_dir)
155
156
        self.run_bzr('mv', 'a', 'b')
156
157
        self.run_bzr('mv', 'b', 'subdir')
157
158
        self.run_bzr('mv', 'subdir/b', 'a')
158
 
        self.run_bzr('mv', 'a', 'b', 'subdir')
 
159
        self.run_bzr('mv', 'a', 'c', 'subdir')
159
160
        self.run_bzr('mv', 'subdir/a', 'subdir/newa')
160
161
 
 
162
 
161
163
    def test_main_version(self):
162
164
        """Check output from version command and master option is reasonable"""
163
165
        # output is intentionally passed through to stdout so that we
197
199
        
198
200
        os.mkdir('a')
199
201
        os.chdir('a')
200
 
 
201
202
        self.example_branch()
202
203
        os.chdir('..')
203
204
        self.runbzr('branch a b')
213
214
        self.runbzr('merge ../b')
214
215
        self.check_file_contents('goodbye', 'quux')
215
216
        # Merging a branch pulls its revision into the tree
216
 
        a = Branch('.')
217
 
        b = Branch('../b')
 
217
        a = Branch.open('.')
 
218
        b = Branch.open('../b')
218
219
        a.get_revision_xml(b.last_patch())
219
 
 
220
220
        self.log('pending merges: %s', a.pending_merges())
221
221
        #        assert a.pending_merges() == [b.last_patch()], "Assertion %s %s" \
222
222
        #        % (a.pending_merges(), b.last_patch())
241
241
        self.runbzr('pull')
242
242
        self.runbzr('commit -m blah --unchanged')
243
243
        os.chdir('../a')
244
 
        a = Branch('.')
245
 
        b = Branch('../b')
 
244
        a = Branch.open('.')
 
245
        b = Branch.open('../b')
246
246
        assert a.revision_history() == b.revision_history()[:-1]
247
247
        self.runbzr('pull ../b')
248
248
        assert a.revision_history() == b.revision_history()
260
260
 
261
261
    def test_add_reports(self):
262
262
        """add command prints the names of added files."""
263
 
        b = Branch('.', init=True)
 
263
        b = Branch.initialize('.')
264
264
        self.build_tree(['top.txt', 'dir/', 'dir/sub.txt'])
265
265
 
266
266
        from cStringIO import StringIO