~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2011-10-04 11:38:49 UTC
  • mfrom: (6184 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6185.
  • Revision ID: v.ladeuil+lp@free.fr-20111004113849-9os4pc4swnvdklxk
Merge trunk to resolve conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2010 Canonical Ltd
 
1
# Copyright (C) 2006-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
454
454
>>>>>>> MERGE-SOURCE
455
455
''',
456
456
                             'lightweight/file')
 
457
 
 
458
 
 
459
    def test_no_upgrade_single_file(self):
 
460
        """There's one basis revision per tree.
 
461
 
 
462
        Since you can't actually change the basis for a single file at the
 
463
        moment, we don't let you think you can.
 
464
 
 
465
        See bug 557886.
 
466
        """
 
467
        self.make_branch_and_tree('.')
 
468
        self.build_tree_contents([('a/',),
 
469
            ('a/file', 'content')])
 
470
        sr = ScriptRunner()
 
471
        sr.run_script(self, '''
 
472
            $ bzr update ./a
 
473
            2>bzr: ERROR: bzr update can only update a whole tree, not a file or subdirectory
 
474
            $ bzr update ./a/file
 
475
            2>bzr: ERROR: bzr update can only update a whole tree, not a file or subdirectory
 
476
            $ bzr update .
 
477
            2>Tree is up to date at revision 0 of branch ...
 
478
            $ cd a
 
479
            $ bzr update .
 
480
            2>bzr: ERROR: bzr update can only update a whole tree, not a file or subdirectory
 
481
            # however, you can update the whole tree from a subdirectory
 
482
            $ bzr update
 
483
            2>Tree is up to date at revision 0 of branch ...
 
484
            ''')