~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_export.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-07-30 01:00:50 UTC
  • mfrom: (3591.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080730010050-yt2pf2kmm4x4c033
do not export things in the .bzr* namespace including .bzrrules (Ian
        Clatworthy)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        tree = self.make_branch_and_tree('tar')
39
39
        self.build_tree(['tar/a'])
40
40
        tree.add('a')
 
41
        self.build_tree_contents([('tar/.bzrrules', '')])
 
42
        tree.add('.bzrrules')
 
43
        self.build_tree(['tar/.bzr-adir/', 'tar/.bzr-adir/afile'])
 
44
        tree.add(['.bzr-adir/', '.bzr-adir/afile'])
41
45
 
42
46
        os.chdir('tar')
43
47
        self.run_bzr('ignore something')
44
48
        tree.commit('1')
45
49
 
46
50
        self.failUnless(tree.has_filename('.bzrignore'))
 
51
        self.failUnless(tree.has_filename('.bzrrules'))
 
52
        self.failUnless(tree.has_filename('.bzr-adir'))
 
53
        self.failUnless(tree.has_filename('.bzr-adir/afile'))
47
54
        self.run_bzr('export test.tar.gz')
48
55
        ball = tarfile.open('test.tar.gz')
49
56
        # Make sure the tarball contains 'a', but does not contain
75
82
        tree = self.make_branch_and_tree('zip')
76
83
        self.build_tree(['zip/a'])
77
84
        tree.add('a')
 
85
        self.build_tree_contents([('zip/.bzrrules', '')])
 
86
        tree.add('.bzrrules')
 
87
        self.build_tree(['zip/.bzr-adir/', 'zip/.bzr-adir/afile'])
 
88
        tree.add(['.bzr-adir/', '.bzr-adir/afile'])
78
89
 
79
90
        os.chdir('zip')
80
91
        self.run_bzr('ignore something')
81
92
        tree.commit('1')
82
93
 
83
94
        self.failUnless(tree.has_filename('.bzrignore'))
 
95
        self.failUnless(tree.has_filename('.bzrrules'))
 
96
        self.failUnless(tree.has_filename('.bzr-adir'))
 
97
        self.failUnless(tree.has_filename('.bzr-adir/afile'))
84
98
        self.run_bzr('export test.zip')
85
99
 
86
100
        zfile = zipfile.ZipFile('test.zip')
139
153
        tree = self.make_branch_and_tree('dir')
140
154
        self.build_tree(['dir/a'])
141
155
        tree.add('a')
 
156
        self.build_tree_contents([('dir/.bzrrules', '')])
 
157
        tree.add('.bzrrules')
 
158
        self.build_tree(['dir/.bzr-adir/', 'dir/.bzr-adir/afile'])
 
159
        tree.add(['.bzr-adir/', '.bzr-adir/afile'])
142
160
 
143
161
        os.chdir('dir')
144
162
        self.run_bzr('ignore something')
145
163
        tree.commit('1')
146
164
 
147
165
        self.failUnless(tree.has_filename('.bzrignore'))
 
166
        self.failUnless(tree.has_filename('.bzrrules'))
 
167
        self.failUnless(tree.has_filename('.bzr-adir'))
 
168
        self.failUnless(tree.has_filename('.bzr-adir/afile'))
148
169
        self.run_bzr('export direxport')
149
170
 
150
171
        files = sorted(os.listdir('direxport'))