[MERGE] Hide .bzr dirs on win32
Marcos Chaves
marcos.nospam at gmail.com
Wed Nov 15 00:22:37 GMT 2006
Hi Alexander,
thanks for the feedback. Actually I thought it would be a good idea
not to use the Python win32 api, but looks like I didn't make enough
homework.
I'm pretty busy with other things, so let's see if any good soul
thinks that this feature is desirable and decide to work on it - I
can't do it now.
Thanks anyway for the comments,
-Marcos
On 11/14/06, Alexander Belchenko <bialix at ukr.net> wrote:
> -----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