[PATCH] ignore bad filetypes rather than failing

John A Meinel john at arbash-meinel.com
Sun Sep 18 17:32:06 BST 2005


The attached patch is available at:
http://bzr.arbash-meinel.com/branches/bzr/ignore-unversioned/
(revisions 1217-1218)

There was a request on IRC for being able to handle directories that
have a socket in them. This change makes bzr allow them, but ignore
them, rather than
Basically it makes bzr have some knowledge about fifo/socket/block/etc
type files. It doesn't try to version them, and adding them is still an
error. It just changes osutils.file_kind() return a valid string, rather
than aborting.

Looking at the rest of the code, it handles these kinds properly. Most
places have "if kind != 'file' or kind != 'directory'" so they trap for
bad types.

I added some test cases for this, but mkfifo/etc doesn't exist on all
platforms. So on Windows the test won't really do much.

John
=:->
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ignore-unversioned.cset
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20050918/7964e5fd/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050918/7964e5fd/attachment.pgp 


More information about the bazaar mailing list