/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Martin Pool
  • Date: 2006-03-20 22:32:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1621.
  • Revision ID: mbp@sourcefrog.net-20060320223241-95ba66352fd77026
Cleanup and document some check code

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import bzrlib
21
21
from bzrlib.tests import TestCaseWithTransport
22
22
from bzrlib.branch import Branch
23
 
from bzrlib.bzrdir import BzrDir, BzrDirMetaFormat1
24
23
from bzrlib.workingtree import WorkingTree
25
24
from bzrlib.commit import Commit
26
25
from bzrlib.config import BranchConfig
27
 
from bzrlib.errors import (PointlessCommit, BzrError, SigningFailed, 
28
 
                           LockContention)
 
26
from bzrlib.errors import PointlessCommit, BzrError, SigningFailed
29
27
 
30
28
 
31
29
# TODO: Test commit with some added, and added-but-missing files
378
376
                         wt.branch.repository.get_revision(
379
377
                            wt.branch.last_revision()).properties)
380
378
 
381
 
    def test_safe_master_lock(self):
382
 
        os.mkdir('master')
383
 
        master = BzrDirMetaFormat1().initialize('master')
384
 
        master.create_repository()
385
 
        master_branch = master.create_branch()
386
 
        master.create_workingtree()
387
 
        bound = master.sprout('bound')
388
 
        wt = bound.open_workingtree()
389
 
        wt.branch.set_bound_location(os.path.realpath('master'))
390
 
        master_branch.lock_write()
391
 
        try:
392
 
            self.assertRaises(LockContention, wt.commit, 'silly')
393
 
        finally:
394
 
            master_branch.unlock()
 
379