bzr clean-tree --force --detritus stops on io error (file in use)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Medium
|
Parth Malwankar |
Bug Description
bzr v 18.1 on windows.
When running
bzr clean-tree --force --detritus --ignored
clean-tree walks the tree and deletes qualifying files, until it hits the first I/O exception and then stops. Instead the strategy should be "Best effort", which means clean-walk should continue walking and skipping those files that resulted in an exception.
The most important exceptions that should skipped is:
[Error 32] The process cannot access the file because it is being used by another process
Now, I could kill the process that is locking the file, but that may be impractical. Regardless, best effor strategy in this case makes sense. (In my case my development project is big and loading the projects into my dev tool takes some time. Unfortunately my dev tool is locking one single file, which prevents me from cleaning the tree, unless a close my dev environment.)
Related branches
- Vincent Ladeuil: Approve
- Martin Packman (community): Needs Fixing
- John A Meinel: Needs Information
-
Diff: 152 lines (+92/-4)3 files modifiedNEWS (+4/-0)
bzrlib/clean_tree.py (+26/-4)
bzrlib/tests/test_clean_tree.py (+62/-0)
tags: | added: clean-tree easy win32 |
Changed in bzr: | |
assignee: | nobody → Parth Malwankar (parthm) |
Changed in bzr: | |
status: | Confirmed → In Progress |
Changed in bzr: | |
status: | In Progress → Fix Released |
milestone: | none → 2.3b1 |
I agree, we should just give a warning and leave it. It will help a bit if you can post the traceback from bzr.log where this occurred.