cache os.umask even on windows
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Mon, 09 Apr 2007 04:24:17 -0300
changeset 4327 aba90193f4e4
parent 4326 5e3936eabe5d
child 4328 1083ae4b5f0e
cache os.umask even on windows
mercurial/util.py
--- a/mercurial/util.py	Fri Dec 29 20:04:30 2006 -0600
+++ b/mercurial/util.py	Mon Apr 09 04:24:17 2007 -0300
@@ -724,6 +724,9 @@
     except:
         return True
 
+_umask = os.umask(0)
+os.umask(_umask)
+
 # Platform specific variants
 if os.name == 'nt':
     demandload(globals(), "msvcrt")
@@ -851,8 +854,6 @@
 
 else:
     nulldev = '/dev/null'
-    _umask = os.umask(0)
-    os.umask(_umask)
 
     def rcfiles(path):
         rcs = [os.path.join(path, 'hgrc')]