[MERGE] Mark .bzr directories as "hidden" on Windows (#71147)

John Arbash Meinel john at arbash-meinel.com
Mon Nov 26 18:53:07 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexander Belchenko wrote:
...

> It used in bzrdir.py: class BzrDirFormat: method initialize_on_transport.
> 
> Here is corresponding hunk of patch:
> 
> @@ -1355,6 +1357,8 @@
>                                        # FIXME: RBC 20060121 don't peek under
>                                        # the covers
>                                        mode=temp_control._dir_mode)
> +        if sys.platform == 'win32' and isinstance(transport, LocalTransport):
> +            win32utils.set_file_attr_hidden(transport._abspath('.bzr'))
>          file_mode = temp_control._file_mode
>          del temp_control
>          mutter('created control directory in ' + transport.base)
> 

Yeah, I missed that, I see it now.

As for os.popen() it is a bit easier to use, but it suffers a bit more from
side-effects. For example, if COMSPEC has any spaces in it, I believe it will fail.

Also, I think popen() is similar to using "shell=True", which may mean that
'ls' gets interpreted by the shell aliases. I know I have "alias ls = ls -F
- --color which would probably give wrong answers versus raw 'ls'.

(I'm not positive on that, but it might be the case.)

subprocess.Popen() takes a bit more, but overall it really gives you a lot more
precision.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHSxYTJdeBCYSNAAMRAn+FAJ0YMj95bnQFnU7YBesH1AojG8LumQCgubwd
+Gzm6cJnSaSUe0AQTGxXjwU=
=uRMU
-----END PGP SIGNATURE-----



More information about the bazaar mailing list