/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/workingtree_implementations/test_smart_add.py

  • Committer: Martin Pool
  • Date: 2009-03-23 07:25:27 UTC
  • mfrom: (4183 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4189.
  • Revision ID: mbp@sourcefrog.net-20090323072527-317my4n8zej1g6v9
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
175
175
            self.assertEqual(None, wt.path2id(path.rstrip('/')),
176
176
                    'Accidentally added path: %s' % (path,))
177
177
 
 
178
    def test_add_file_in_unknown_dir(self):
 
179
        # Test that parent directory addition is implicit
 
180
        tree = self.make_branch_and_tree('.')
 
181
        self.build_tree(['dir/', 'dir/subdir/', 'dir/subdir/foo'])
 
182
        tree.smart_add(['dir/subdir/foo'])
 
183
        tree.lock_read()
 
184
        self.addCleanup(tree.unlock)
 
185
        self.assertEqual(['', 'dir', 'dir/subdir', 'dir/subdir/foo'],
 
186
            [path for path, ie in tree.iter_entries_by_dir()])
 
187
 
178
188
    def test_custom_ids(self):
179
189
        sio = StringIO()
180
190
        action = AddCustomIDAction(to_file=sio, should_print=True)