~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 04:25:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5472.
  • Revision ID: andrew.bennetts@canonical.com-20101008042510-sg9vdhmnggilzxsk
Fix stray TAB in source.

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 (
33
 
    fixtures,
34
 
    TestCaseWithTransport,
35
 
    )
 
32
from bzrlib.tests import TestCaseWithTransport
36
33
from bzrlib.uncommit import uncommit
37
34
from bzrlib.workingtree import WorkingTree
38
35
 
145
142
        self.run_bzr('pull -r 4')
146
143
        self.assertEqual(a.revision_history(), b.revision_history())
147
144
 
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
 
        target_bzrdir = source.bzrdir.sprout('target')
156
 
        source.tags.set_tag('tag-a', 'rev-2')
157
 
        # Pull from source
158
 
        self.run_bzr('pull -d target source')
159
 
        target = target_bzrdir.open_branch()
160
 
        # The tag is present, and so is its revision.
161
 
        self.assertEqual('rev-2', target.tags.lookup_tag('tag-a'))
162
 
        target.repository.get_revision('rev-2')
163
145
 
164
146
    def test_overwrite_uptodate(self):
165
147
        # Make sure pull --overwrite overwrites
513
495
        self.assertEqual(out,
514
496
                         ('','bzr: ERROR: Need working tree for --show-base.\n'))
515
497
 
516
 
    def test_pull_tag_conflicts(self):
517
 
        """pulling tags with conflicts will change the exit code"""
518
 
        # create a branch, see that --show-base fails
519
 
        from_tree = self.make_branch_and_tree('from')
520
 
        from_tree.branch.tags.set_tag("mytag", "somerevid")
521
 
        to_tree = self.make_branch_and_tree('to')
522
 
        to_tree.branch.tags.set_tag("mytag", "anotherrevid")
523
 
        out = self.run_bzr(['pull','-d','to','from'],retcode=1)
524
 
        self.assertEqual(out,
525
 
            ('No revisions to pull.\nConflicting tags:\n    mytag\n', ''))
 
498