~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/workingtree_implementations/test_remove.py

  • Committer: Vincent Ladeuil
  • Date: 2008-09-22 09:43:40 UTC
  • mto: This revision was merged to the branch mainline in revision 3722.
  • Revision ID: v.ladeuil+lp@free.fr-20080922094340-h8e6z4dlu429jnhr
Fix bug #272648 

* bzrlib/tests/workingtree_implementations/test_remove.py:
(TestRemove.test_remove_file_and_containing_dir): Reproduce bug
#272648.

* bzrlib/workingtree.py:
(WorkingTree.walkdirs): Don't try to remove '.bzr' if it's not
there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007 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
327
327
        self.failIfExists('config/file')
328
328
        self.failIfExists('config')
329
329
        tree._validate()
 
330
 
 
331
    def test_remove_dir_before_bzr(self):
 
332
        # As per bug #272648. Note that a file must be present in the directory
 
333
        # or the bug doesn't manifest itself.
 
334
        tree = self.get_committed_tree(['.aaa/', '.aaa/file'])
 
335
        tree.remove('.aaa/', keep_files=False)
 
336
        self.failIfExists('.aaa/file')
 
337
        self.failIfExists('.aaa')
 
338
        tree._validate()