/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_transform.py

  • Committer: Alexander Belchenko
  • Date: 2007-12-02 00:51:21 UTC
  • mto: This revision was merged to the branch mainline in revision 3064.
  • Revision ID: bialix@ukr.net-20071202005121-ojfk3u9free2h2en
test for two directories clash

Show diffs side-by-side

added added

removed removed

Lines of Context:
1104
1104
        self.assertContainsRe(str(err),
1105
1105
            "^File exists: .+/foo")
1106
1106
 
 
1107
    def test_two_directories_clash(self):
 
1108
        def tt_helper():
 
1109
            wt = self.make_branch_and_tree('.')
 
1110
            tt = TreeTransform(wt)  # TreeTransform obtains write lock
 
1111
            try:
 
1112
                tt.new_directory('foo', tt.root)
 
1113
                tt.new_directory('foo', tt.root)
 
1114
                tt.apply(no_conflicts=True)
 
1115
            finally:
 
1116
                wt.unlock()
 
1117
        err = self.assertRaises(errors.FileExists, tt_helper)
 
1118
        self.assertContainsRe(str(err),
 
1119
            "^File exists: .+/foo")
 
1120
 
1107
1121
 
1108
1122
class TransformGroup(object):
1109
1123