/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_pull.py

  • Committer: Vincent Ladeuil
  • Date: 2011-11-24 15:48:29 UTC
  • mfrom: (6289 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6337.
  • Revision ID: v.ladeuil+lp@free.fr-20111124154829-avowjpsxdl8yp2vz
merge trunk resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
 
19
19
from bzrlib import tests
 
20
from bzrlib.revision import NULL_REVISION
20
21
from bzrlib.tests import per_workingtree
21
22
 
22
23
 
30
31
        tree_b = self.make_branch_and_tree('to')
31
32
        return tree, tree_b
32
33
 
 
34
    def test_pull_null(self):
 
35
        tree_a, tree_b = self.get_pullable_trees()
 
36
        root_id = tree_a.get_root_id()
 
37
        tree_a.pull(tree_b.branch, stop_revision=NULL_REVISION, overwrite=True)
 
38
        self.assertEquals(root_id, tree_a.get_root_id())
 
39
 
33
40
    def test_pull(self):
34
41
        tree_a, tree_b = self.get_pullable_trees()
35
42
        tree_b.pull(tree_a.branch)
39
46
    def test_pull_overwrites(self):
40
47
        tree_a, tree_b = self.get_pullable_trees()
41
48
        tree_b.commit('foo', rev_id='B')
42
 
        self.assertEqual(['B'], tree_b.branch.revision_history())
 
49
        self.assertEqual('B', tree_b.branch.last_revision())
43
50
        tree_b.pull(tree_a.branch, overwrite=True)
44
51
        self.assertTrue(tree_b.branch.repository.has_revision('A'))
45
52
        self.assertTrue(tree_b.branch.repository.has_revision('B'))