/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/blackbox/test_pull.py

  • Committer: Vincent Ladeuil
  • Date: 2011-08-16 13:12:40 UTC
  • mfrom: (6071 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6076.
  • Revision ID: v.ladeuil+lp@free.fr-20110816131240-gcyn9cik86dxwgz3
Merge into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from bzrlib.branch import Branch
30
30
from bzrlib.directory_service import directories
31
31
from bzrlib.osutils import pathjoin
32
 
from bzrlib.tests import TestCaseWithTransport
 
32
from bzrlib.tests import (
 
33
    fixtures,
 
34
    TestCaseWithTransport,
 
35
    )
33
36
from bzrlib.uncommit import uncommit
34
37
from bzrlib.workingtree import WorkingTree
35
38
 
142
145
        self.run_bzr('pull -r 4')
143
146
        self.assertEqual(a.revision_history(), b.revision_history())
144
147
 
 
148
    def test_pull_tags(self):
 
149
        """Tags are updated by pull, and revisions named in those tags are
 
150
        fetched.
 
151
        """
 
152
        # Make a source, sprout a target off it
 
153
        builder = self.make_branch_builder('source')
 
154
        source = fixtures.build_branch_with_non_ancestral_rev(builder)
 
155
        source.get_config().set_user_option('branch.fetch_tags', 'True')
 
156
        target_bzrdir = source.bzrdir.sprout('target')
 
157
        source.tags.set_tag('tag-a', 'rev-2')
 
158
        # Pull from source
 
159
        self.run_bzr('pull -d target source')
 
160
        target = target_bzrdir.open_branch()
 
161
        # The tag is present, and so is its revision.
 
162
        self.assertEqual('rev-2', target.tags.lookup_tag('tag-a'))
 
163
        target.repository.get_revision('rev-2')
 
164
 
145
165
    def test_overwrite_uptodate(self):
146
166
        # Make sure pull --overwrite overwrites
147
167
        # even if the target branch has merged
391
411
        # being too low. If rpc_count increases, more network roundtrips have
392
412
        # become necessary for this use case. Please do not adjust this number
393
413
        # upwards without agreement from bzr's network support maintainers.
394
 
        self.assertLength(18, self.hpss_calls)
 
414
        self.assertLength(19, self.hpss_calls)
395
415
        remote = Branch.open('stacked')
396
416
        self.assertEndsWith(remote.get_stacked_on_url(), '/parent')
397
417