~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2005-12-31 00:51:34 UTC
  • mto: (1587.1.6 bound-branches)
  • mto: This revision was merged to the branch mainline in revision 1590.
  • Revision ID: john@arbash-meinel.com-20051231005134-dd54e393c7d3b612
Updated pull. Now all paths which call set_revision_history maintain the branch invariant. All tests pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
 
307
307
        bzr('cat-revision', new_rev_id)
308
308
 
 
309
    def test_pull_overwrite_fails(self):
 
310
        bzr = self.run_bzr
 
311
        self.create_branches()
 
312
 
 
313
        bzr('branch', 'child', 'other')
 
314
        
 
315
        os.chdir('other')
 
316
        open('a', 'wb').write('new contents\n')
 
317
        bzr('commit', '-m', 'changed a')
 
318
        self.check_revno(2)
 
319
        open('a', 'ab').write('and then some\n')
 
320
        bzr('commit', '-m', 'another a')
 
321
        self.check_revno(3)
 
322
        open('a', 'ab').write('and some more\n')
 
323
        bzr('commit', '-m', 'yet another a')
 
324
        self.check_revno(4)
 
325
 
 
326
        os.chdir('../child')
 
327
        open('a', 'wb').write('also changed a\n')
 
328
        bzr('commit', '-m', 'child modified a')
 
329
 
 
330
        self.check_revno(2)
 
331
        self.check_revno(2, '../base')
 
332
 
 
333
        # It might be possible that we want pull --overwrite to
 
334
        # actually succeed.
 
335
        # If we want it, just change this test to make sure that 
 
336
        # both base and child are updated properly
 
337
        bzr('pull', '--overwrite', '../other', retcode=3)
 
338
 
 
339
        # It should fail without changing the local revision
 
340
        self.check_revno(2)
 
341
        self.check_revno(2, '../base')
309
342