/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: Aaron Bentley
  • Date: 2007-12-15 16:35:40 UTC
  • mfrom: (3113 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3115.
  • Revision ID: aaron.bentley@utoronto.ca-20071215163540-g04zcop5aj5h1nwh
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1124
1124
        self.assertContainsRe(str(err),
1125
1125
            "^File exists: .+/foo")
1126
1126
 
 
1127
    def test_two_directories_clash_finalize(self):
 
1128
        def tt_helper():
 
1129
            wt = self.make_branch_and_tree('.')
 
1130
            tt = TreeTransform(wt)  # TreeTransform obtains write lock
 
1131
            try:
 
1132
                foo_1 = tt.new_directory('foo', tt.root)
 
1133
                tt.new_directory('bar', foo_1)
 
1134
                foo_2 = tt.new_directory('foo', tt.root)
 
1135
                tt.new_directory('baz', foo_2)
 
1136
                # Lie to tt that we've already resolved all conflicts.
 
1137
                tt.apply(no_conflicts=True)
 
1138
            except:
 
1139
                tt.finalize()
 
1140
                raise
 
1141
        err = self.assertRaises(errors.FileExists, tt_helper)
 
1142
        self.assertContainsRe(str(err),
 
1143
            "^File exists: .+/foo")
 
1144
 
1127
1145
 
1128
1146
class TransformGroup(object):
1129
1147