/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/workingtree.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) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2005, 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
2326
2326
                    # value.
2327
2327
                    bzrdir_loc = bisect_left(cur_disk_dir_content,
2328
2328
                        ('.bzr', '.bzr'))
2329
 
                    if cur_disk_dir_content[bzrdir_loc][0] == '.bzr':
 
2329
                    if (bzrdir_loc < len(cur_disk_dir_content)
 
2330
                        and cur_disk_dir_content[bzrdir_loc][0] == '.bzr'):
2330
2331
                        # we dont yield the contents of, or, .bzr itself.
2331
2332
                        del cur_disk_dir_content[bzrdir_loc]
2332
2333
            if inv_finished: