attempt to update locked file on windows leaves the file deleted

Bug #338750 reported by Jim Hodapp
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Wishlist
Unassigned

Bug Description

When trying to add and then commit a file to a local working tree which is currently opened by Microsoft Word, bzr fails when trying to do the commit part. Instead of backing out of the transaction and not touching the file, it seemed to mark the file and revision as dead. Thanks to some help from the #bzr chat room I was able to retrieve the file. This is a bug however, and bzr should simply back out of trying to commit the revision and instead inform the user that another process has the file opened and locked and cannot commit.

I am attaching the log of the attempted file add and commit. The file that this occurred with is called Battery Controller CoProcessor Specifications.doc

Revision history for this message
Jim Hodapp (jhodapp) wrote :
Revision history for this message
Robert Collins (lifeless) wrote :

looking at the log:
 - a merge tries to replace the doc file, but fails, leaving no file there (you can move, but not replace in use files on some win32 environments)
 - a subsequent commit implicitly deletes the file (as specced).

This is kindof fodder for the 'commit should not implicitly delete' bug. I don't know that there is a lot we can do to prevent it happening; we can't tell there is an issue until the OS tells us there is, and once it tells us, we can't recover.

Changed in bzr:
status: New → Confirmed
importance: Undecided → Wishlist
Martin Pool (mbp)
summary: - Windows lock commit error
+ attempt to update locked file on windows leaves the file deleted
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.