~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_branch.py

  • Committer: Robert Collins
  • Date: 2006-02-21 11:42:36 UTC
  • mfrom: (1534.1.36 inter-repo-api)
  • mto: This revision was merged to the branch mainline in revision 1560.
  • Revision ID: robertc@robertcollins.net-20060221114236-0deb1948f0c8c956
Merge in InterRepository API support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
 
97
97
    def test_fetch_revisions(self):
98
98
        """Test fetch-revision operation."""
99
 
        from bzrlib.fetch import Fetcher
100
99
        get_transport(self.get_url()).mkdir('b1')
101
100
        get_transport(self.get_url()).mkdir('b2')
102
101
        wt = self.make_branch_and_tree('b1')
107
106
        wt.commit('lala!', rev_id='revision-1', allow_pointless=False)
108
107
 
109
108
        mutter('start fetch')
110
 
        f = Fetcher(from_branch=b1, to_branch=b2)
111
 
        eq = self.assertEquals
112
 
        eq(f.count_copied, 1)
113
 
        eq(f._last_revision, 'revision-1')
 
109
        self.assertEqual((1, []), b2.fetch(b1))
114
110
 
115
111
        rev = b2.repository.get_revision('revision-1')
116
112
        tree = b2.repository.revision_tree('revision-1')
117
 
        eq(tree.get_file_text('foo-id'), 'hello')
 
113
        self.assertEqual(tree.get_file_text('foo-id'), 'hello')
118
114
 
119
115
    def get_unbalanced_tree_pair(self):
120
116
        """Return two branches, a and b, with one file in a."""