~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-07-21 15:15:53 UTC
  • mfrom: (3566.1.2 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080721151553-11iasd1407hkznk1
Fix file -> directory handling (jwestby, #248448)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1215
1215
        self.assertContainsRe(str(err),
1216
1216
            "^File exists: .+/foo")
1217
1217
 
 
1218
    def test_file_to_directory(self):
 
1219
        wt = self.make_branch_and_tree('.')
 
1220
        self.build_tree(['foo'])
 
1221
        wt.add(['foo'])
 
1222
        tt = TreeTransform(wt)
 
1223
        self.addCleanup(tt.finalize)
 
1224
        foo_trans_id = tt.trans_id_tree_path("foo")
 
1225
        tt.delete_contents(foo_trans_id)
 
1226
        tt.create_directory(foo_trans_id)
 
1227
        bar_trans_id = tt.trans_id_tree_path("foo/bar")
 
1228
        tt.create_file(["aa\n"], bar_trans_id)
 
1229
        tt.version_file("bar-1", bar_trans_id)
 
1230
        tt.apply()
 
1231
        self.failUnlessExists("foo/bar")
 
1232
 
1218
1233
 
1219
1234
class TransformGroup(object):
1220
1235