~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_push.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-08 14:37:25 UTC
  • mfrom: (4516 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4517.
  • Revision ID: john@arbash-meinel.com-20090708143725-sc9sjy3mz4cxwxzz
Merge bzr.dev 4516

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
        tree.commit('one', rev_id='r1')
34
34
        return tree
35
35
 
36
 
    def test_push_new_branch(self):     
 
36
    def test_push_new_branch(self):
37
37
        tree = self.create_simple_tree()
38
38
        dir = self.make_repository('dir').bzrdir
39
39
        result = dir.push_branch(tree.branch)
40
40
        self.assertEquals(tree.branch, result.source_branch)
41
41
        self.assertEquals(dir.open_branch().base, result.target_branch.base)
42
 
        self.assertEquals(dir.open_branch().base, 
 
42
        self.assertEquals(dir.open_branch().base,
43
43
            tree.branch.get_push_location())
44
44
 
45
45
    def test_push_new_empty(self):
47
47
        dir = self.make_repository('dir').bzrdir
48
48
        result = dir.push_branch(tree.branch)
49
49
        self.assertEquals(tree.branch.base, result.source_branch.base)
50
 
        self.assertEquals(dir.open_branch().base, 
 
50
        self.assertEquals(dir.open_branch().base,
51
51
            result.target_branch.base)
52
52
 
53
53
    def test_push_incremental(self):
58
58
        tree.add(['b'])
59
59
        tree.commit('two', rev_id='r2')
60
60
        result = dir.push_branch(tree.branch)
61
 
        self.assertEquals(tree.last_revision(), 
 
61
        self.assertEquals(tree.last_revision(),
62
62
            result.branch_push_result.new_revid)
63
63
        self.assertEquals(2, result.branch_push_result.new_revno)
64
64
        self.assertEquals(tree.branch.base, result.source_branch.base)