~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-02-17 17:11:16 UTC
  • mfrom: (4797.2.17 2.1)
  • mto: (4797.2.18 2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: john@arbash-meinel.com-20100217171116-h7t9223ystbnx5h8
merge bzr.2.1 in preparation for NEWS entry.

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.blackbox import ExternalBase
33
33
from bzrlib.uncommit import uncommit
34
34
from bzrlib.workingtree import WorkingTree
35
35
 
36
36
 
37
 
class TestPull(TestCaseWithTransport):
 
37
class TestPull(ExternalBase):
38
38
 
39
39
    def example_branch(self, path='.'):
40
40
        tree = self.make_branch_and_tree(path)
343
343
            def look_up(self, name, url):
344
344
                return 'source'
345
345
        directories.register('foo:', FooService, 'Testing directory service')
346
 
        self.addCleanup(directories.remove, 'foo:')
 
346
        self.addCleanup(lambda: directories.remove('foo:'))
347
347
        self.run_bzr('pull foo:bar -d target')
348
348
        self.assertEqual(source_last, target.last_revision())
349
349
 
433
433
            from_tree.branch.bzrdir.root_transport.base])
434
434
        self.assertContainsRe(err,
435
435
            "(?m)Doing on-the-fly conversion")
436
 
 
437
 
    def test_pull_to_experimental_format_warning(self):
438
 
        """You get a warning for pulling into experimental formats.
439
 
        """
440
 
        from_tree = self.make_branch_and_tree('from', format='development-subtree')
441
 
        to_tree = self.make_branch_and_tree('to', format='development-subtree')
442
 
        from_tree.commit(message='first commit')
443
 
        out, err = self.run_bzr(['pull', '-d', 'to', 'from'])
444
 
        self.assertContainsRe(err,
445
 
            "(?m)Fetching into experimental format")
446
 
 
447
 
    def test_pull_cross_to_experimental_format_warning(self):
448
 
        """You get a warning for pulling into experimental formats.
449
 
        """
450
 
        from_tree = self.make_branch_and_tree('from', format='2a')
451
 
        to_tree = self.make_branch_and_tree('to', format='development-subtree')
452
 
        from_tree.commit(message='first commit')
453
 
        out, err = self.run_bzr(['pull', '-d', 'to', 'from'])
454
 
        self.assertContainsRe(err,
455
 
            "(?m)Fetching into experimental format")