~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge from integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
472
472
        self.assert_(os.path.exists('sub/a.txt.OTHER'))
473
473
        self.assert_(os.path.exists('sub/a.txt.BASE'))
474
474
 
475
 
    def test_pull(self):
476
 
        """Pull changes from one branch to another."""
477
 
        os.mkdir('a')
478
 
        os.chdir('a')
479
 
 
480
 
        self.example_branch()
481
 
        self.runbzr('pull', retcode=3)
482
 
        self.runbzr('missing', retcode=3)
483
 
        self.runbzr('missing .')
484
 
        self.runbzr('missing')
485
 
        self.runbzr('pull')
486
 
        self.runbzr('pull /', retcode=3)
487
 
        self.runbzr('pull')
488
 
 
489
 
        os.chdir('..')
490
 
        self.runbzr('branch a b')
491
 
        os.chdir('b')
492
 
        self.runbzr('pull')
493
 
        os.mkdir('subdir')
494
 
        self.runbzr('add subdir')
495
 
        self.runbzr('commit -m blah --unchanged')
496
 
        os.chdir('../a')
497
 
        a = Branch.open('.')
498
 
        b = Branch.open('../b')
499
 
        self.assertEquals(a.revision_history(), b.revision_history()[:-1])
500
 
        self.runbzr('pull ../b')
501
 
        self.assertEquals(a.revision_history(), b.revision_history())
502
 
        self.runbzr('commit -m blah2 --unchanged')
503
 
        os.chdir('../b')
504
 
        self.runbzr('commit -m blah3 --unchanged')
505
 
        # no overwrite
506
 
        self.runbzr('pull ../a', retcode=3)
507
 
        os.chdir('..')
508
 
        self.runbzr('branch b overwriteme')
509
 
        os.chdir('overwriteme')
510
 
        self.runbzr('pull --overwrite ../a')
511
 
        overwritten = Branch.open('.')
512
 
        self.assertEqual(overwritten.revision_history(),
513
 
                         a.revision_history())
514
 
        os.chdir('../a')
515
 
        self.runbzr('merge ../b')
516
 
        self.runbzr('commit -m blah4 --unchanged')
517
 
        os.chdir('../b/subdir')
518
 
        self.runbzr('pull ../../a')
519
 
        self.assertEquals(a.revision_history()[-1], b.revision_history()[-1])
520
 
        self.runbzr('commit -m blah5 --unchanged')
521
 
        self.runbzr('commit -m blah6 --unchanged')
522
 
        os.chdir('..')
523
 
        self.runbzr('pull ../a')
524
 
        os.chdir('../a')
525
 
        self.runbzr('commit -m blah7 --unchanged')
526
 
        self.runbzr('merge ../b')
527
 
        self.runbzr('commit -m blah8 --unchanged')
528
 
        self.runbzr('pull ../b')
529
 
        self.runbzr('pull ../b')
530
 
 
531
475
    def test_inventory(self):
532
476
        bzr = self.runbzr
533
477
        def output_equals(value, *args):
976
920
        self.runbzr('commit --unchanged -m unchanged')
977
921
 
978
922
        os.chdir('../output-branch')
979
 
        # should be a diff as we have not pushed the tree
980
 
        self.runbzr('diff', retcode=1)
981
 
        self.runbzr('revert')
982
 
        # but not now.
 
923
        # There is no longer a difference as long as we have
 
924
        # access to the working tree
983
925
        self.runbzr('diff')
 
926
 
 
927
        # But we should be missing a revision
 
928
        self.runbzr('missing ../my-branch', retcode=1)
 
929
 
984
930
        # diverge the branches
985
931
        self.runbzr('commit --unchanged -m unchanged')
986
932
        os.chdir('../my-branch')