~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-19 04:37:48 UTC
  • mfrom: (5741.3.8 506265-command-deprecation)
  • Revision ID: pqm@pqm.ubuntu.com-20110419043748-qq4lsmc50cckqzp7
(mbp) Deprecate 'bzr clone' and 'bzr get' (bug 506265) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    test_server,
34
34
    )
35
35
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
 
36
from bzrlib.tests.script import run_script
36
37
from bzrlib.urlutils import local_path_to_url, strip_trailing_slash
37
38
from bzrlib.workingtree import WorkingTree
38
39
 
501
502
        # Ensure that no working tree what created remotely
502
503
        self.assertFalse(t.has('remote/file'))
503
504
 
 
505
 
 
506
class TestDeprecatedAliases(TestCaseWithTransport):
 
507
 
 
508
    def test_deprecated_aliases(self):
 
509
        """bzr branch can be called clone or get, but those names are deprecated.
 
510
 
 
511
        See bug 506265.
 
512
        """
 
513
        for command in ['clone', 'get']:
 
514
            run_script(self, """
 
515
            $ bzr %(command)s A B
 
516
            2>The command 'bzr %(command)s' has been deprecated in bzr 2.4. Please use 'bzr branch' instead.
 
517
            2>bzr: ERROR: Not a branch...
 
518
            """ % locals())