[MERGE] Hide .bzr dirs on win32
Alexander Belchenko
bialix at ukr.net
Tue Nov 14 12:34:10 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Marcos Chaves пишет:
> Hi,
>
> this is little patch to hide the '.bzr' dirs on windows. Suggestions?
- -1
Because:
1) For me is better to mark directory as hidden only from those commands
(init, branch) where bzr actually create new branch. Doing it at
transport level slowdown bzr a bit.
2) abspath.endswith('.bzr') is bad. It will trigger on any file. What if
user want to store in file with extension '.bzr'? How you divide?
3) os.system('attrib +h ' + abspath) -- doing it via subprocess is
something slow on windows. Bzr require to have pywin32 package. We can
set hide bit via pywin32:
# import from pywin32 package (http://pywin32.sf.net)
from win32file import (SetFileAttributes, FILE_ATTRIBUTE_HIDDEN)
and then:
# change attributes of file to Hidden
SetFileAttributes(filename, FILE_ATTRIBUTE_HIDDEN)
I think this function need to be implemented in osutils.py or in local
transport.
And yes, if pywin32 is not installed (IMO, unlikely) we can fall back to
os.system('attrib...')
4) I suppose this patch related to bug #71147. But hiding all .bzr is
good for branches with trees and IMO not good for shared repo without
trees. In latter case there will be a bunch of empty directories with no
mark that it's a repo/branch without trees. For me it's confusing.
I'd like to hear more opinions.
Not just "this mirrors the behavior on Linux".
Alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFWbfCzYr338mxwCURAr92AJ0abEAoUX9lk3fZksa/sSHxqNc61gCeMhnX
Zabfj8Qr1Zar4ntYVXRKvkM=
=9Hbm
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list