~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2010-05-06 23:41:35 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506234135-yivbzczw1sejxnxc
Lock methods on ``Tree``, ``Branch`` and ``Repository`` are now
expected to return an object which can be used to unlock them. This reduces
duplicate code when using cleanups. The previous 'tokens's returned by
``Branch.lock_write`` and ``Repository.lock_write`` are now attributes
on the result of the lock_write. ``repository.RepositoryWriteLockResult``
and ``branch.BranchWriteLockResult`` document this. (Robert Collins)

``log._get_info_for_log_files`` now takes an add_cleanup callable.
(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib import (
21
21
    bzrdir,
22
22
    )
23
 
from bzrlib.tests import (
24
 
    TestCaseWithTransport,
 
23
from bzrlib.tests.blackbox import (
 
24
    ExternalBase,
25
25
    )
26
26
 
27
27
 
28
 
class TestRemoveBranch(TestCaseWithTransport):
 
28
class TestRemoveBranch(ExternalBase):
29
29
 
30
30
    def example_branch(self, path='.'):
31
31
        tree = self.make_branch_and_tree(path)
42
42
        self.run_bzr('rmbranch a')
43
43
        dir = bzrdir.BzrDir.open('a')
44
44
        self.assertFalse(dir.has_branch())
45
 
        self.assertPathExists('a/hello')
46
 
        self.assertPathExists('a/goodbye')
 
45
        self.failUnlessExists('a/hello')
 
46
        self.failUnlessExists('a/goodbye')
47
47
 
48
48
    def test_no_branch(self):
49
49
        # No branch in the current directory.