switch doesn't delete ignored files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Medium
|
Unassigned |
Bug Description
If I have ignored files in a subdirectory which does not exist in a parallel branch, switching to that parallel branch produces a conflict due to it being unable to delete the subdirectory because it is not empty. If I remove the ignored files, it switches correctly.
Steps to reproduce:
C:\tmp\bzrtest>bzr init-repo .
Shared repository with trees (format: 2a)
Location:
shared repository: .
C:\tmp\bzrtest>bzr init trunk
Created a repository tree (format: 2a)
Using shared repository: C:/tmp/bzrtest/
C:\tmp\bzrtest>cd trunk
C:\tmp\
C:\tmp\
C:\tmp\
adding module1
adding module1/file1.txt
C:\tmp\
Committing to: C:/tmp/
added module1
added module1/file1.txt
Committed revision 1.
C:\tmp\
C:\tmp\bzrtest>bzr branch trunk ver1
Branched 1 revision(s).
C:\tmp\bzrtest>cd trunk
C:\tmp\
C:\tmp\
C:\tmp\
adding module2
adding module2/file2.txt
C:\tmp\
Committing to: C:/tmp/
added module2
added module2/file2.txt
Committed revision 2.
C:\tmp\
C:\tmp\bzrtest>bzr co --lightweight trunk work
C:\tmp\bzrtest>cd work
C:\tmp\
C:\tmp\
C:\tmp\
C:\tmp\
Committing to: C:/tmp/
added .bzrignore
Committed revision 3.
C:\tmp\
Conflict: can't delete module2 because it is not empty. Not deleting.
Updated to revision 1.
Switched to branch: C:/tmp/
C:\tmp\
Conflict adding file module2. Moved existing file to module2.moved.
Updated to revision 3.
Switched to branch: C:/tmp/
C:\tmp\
C:\tmp\
C:\tmp\
Updated to revision 1.
Switched to branch: C:/tmp/
C:\tmp\
Updated to revision 3.
Switched to branch: C:/tmp/
tags: | added: check-for-breezy |
On the other hand, if switch did delete ignored files, it would be a whole lot less useful for big branches where you want to preserve build artefacts and such like.