~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: 2009-07-16 09:37:25 UTC
  • mfrom: (4539.2.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090716093725-tb2a3b4hin8uia6j
(robertc) Fix bzr mv to not take out branch locks,
        fixing it when the branch is readonly. (Robert Collins, bug 216541)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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_readonly_lightweight_checkout(self):
 
491
        branch = self.make_branch('foo')
 
492
        branch = bzrlib.branch.Branch.open('readonly+' + branch.base)
 
493
        tree = branch.create_checkout('tree', lightweight=True)
 
494
        self.build_tree(['tree/path'])
 
495
        tree.add('path')
 
496
        # If this fails, the tree is trying to acquire a branch lock, which it
 
497
        # shouldn't.
 
498
        self.run_bzr(['mv', 'tree/path', 'tree/path2'])