/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/blackbox/test_versioning.py

  • Committer: Parth Malwankar
  • Date: 2010-02-17 09:32:47 UTC
  • mto: (5070.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5071.
  • Revision ID: parth.malwankar@gmail.com-20100217093247-pxew43a4ip5x6yqz
fixed mkdir and added test case for unversioned dir within branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        newdir = pathjoin(dir, 'abc')
54
54
        self.failIfExists(newdir)
55
55
 
 
56
    def test_mkdir_outside_unversioned_dir_within_branch(self):
 
57
        """'mkdir' should fail with unversioned directory inside branch. Bug #138600"""
 
58
        b = 'foobar0'
 
59
        self.make_branch_and_tree(b)
 
60
        os.chdir(b)
 
61
        dir = pathjoin('.', 'unversioned_dir0')
 
62
        newdir = pathjoin(dir, 'abc')
 
63
        os.mkdir(dir)
 
64
        self.run_bzr(['mkdir', newdir], retcode=3)
 
65
        self.failIfExists(newdir)
 
66
 
 
67
    def test_mkdir_inside_unversioned_dir_within_branch(self):
 
68
        """'mkdir' should fail cleanly from within an unversioned directory
 
69
        inside branch. Bug #138600"""
 
70
        b = 'foobar1'
 
71
        self.make_branch_and_tree(b)
 
72
        os.chdir(b)
 
73
        dir = pathjoin('.', 'unversioned_dir1')
 
74
        os.mkdir(dir)
 
75
        self.run_bzr('mkdir abc', working_dir=dir, retcode=3)
 
76
        newdir = pathjoin(dir, 'abc')
 
77
        self.failIfExists(newdir)
 
78
 
56
79
 
57
80
class TestVersioning(TestCaseInTempDir):
58
81