cannot create file "aux.rst", no error handling

Bug #566174 reported by Kiscsirke
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

On windows, when trying to create a file named "aux.rst", windows pops an error message saying

This file name is reserved for use by Windows.
Choose another name and try again"

When trying to check out a repository which contains a file named such (obviously made by people not using windows), bzr doesn't provide a meaningful error message, it just says

"bzr: ERROR: [Errno 2] No such file or directory: u'D:/prog/widelands/bzr/pr_widelands/widelands_test/.bzr/checkout/limbo/new-259/source/aux.rst'"

Obviously this isn't a problem bzr can do much about, but better error handling would be nice.

If someone wants to test this, they can use lp:widelands revisions 5208 to at least 5236.

Revision history for this message
Alexander Belchenko (bialix) wrote :

There is a bunch of reserved filenames on Windows, like: con, prn, aux, lpt1, lpt2, com1, com2, etc. which cannot be used as basenames of the files. I agree bzr should fail there with better error message.

Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: win32
removed: windows
Revision history for this message
Eli Zaretskii (eliz) wrote :

As of this writing, the error message does make more sense:

  bzr: ERROR: File exists: u'D:/usr/eli/bzr/libunwind.git/aux': [Error 183] Cannot create a file when that file already exists

However, just having a clear message doesn't solve the problem, as bzr bails out and refuses to continue. In my case, I tried to clone the libunwind git repository using bzr-git:

  bzr branch git://

The result is that I have no repository, just an empty directory.

Even skipping the offending file would IMO be better, because in some use cases that might be good enough, since such a package obviously cannot be built on Windows anyway. Bonus points for creating the file with a different name, leaving a log of renames somewhere -- this could help the user produce a series of "bzr mv" commands to actually rename the files in the repo.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Having the ability to do renames would be a really nice thing to put into the next working tree format.

Revision history for this message
Aaron Bentley (abentley) wrote :

If building the tree generated a different filename, it would ideally still commit under the old filename unless the user renamed it. This seems hairy.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers