~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-29 22:03:03 UTC
  • mfrom: (5416.2.6 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100929220303-cr95h8iwtggco721
(mbp) Add 'break-lock --force'

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006-2010 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
18
18
 
19
19
import os
20
20
 
 
21
import bzrlib.branch
21
22
from bzrlib import (
22
23
    osutils,
23
24
    workingtree,
485
486
                                retcode=3)
486
487
        self.assertEqual('bzr: ERROR: --after cannot be specified with'
487
488
                         ' --auto.\n', err)
 
489
 
 
490
    def test_mv_quiet(self):
 
491
        tree = self.make_branch_and_tree('.')
 
492
        self.build_tree(['aaa'])
 
493
        tree.add(['aaa'])
 
494
        out, err = self.run_bzr('mv --quiet aaa bbb')
 
495
        self.assertEqual(out, '')
 
496
        self.assertEqual(err, '')
 
497
 
 
498
    def test_mv_readonly_lightweight_checkout(self):
 
499
        branch = self.make_branch('foo')
 
500
        branch = bzrlib.branch.Branch.open(self.get_readonly_url('foo'))
 
501
        tree = branch.create_checkout('tree', lightweight=True)
 
502
        self.build_tree(['tree/path'])
 
503
        tree.add('path')
 
504
        # If this fails, the tree is trying to acquire a branch lock, which it
 
505
        # shouldn't.
 
506
        self.run_bzr(['mv', 'tree/path', 'tree/path2'])