comparison mercurial/util.py @ 4327:aba90193f4e4

cache os.umask even on windows
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 09 Apr 2007 04:24:17 -0300
parents 5e3936eabe5d
children 1083ae4b5f0e
comparison
equal deleted inserted replaced
4326:5e3936eabe5d 4327:aba90193f4e4
722 return False 722 return False
723 return True 723 return True
724 except: 724 except:
725 return True 725 return True
726 726
727 _umask = os.umask(0)
728 os.umask(_umask)
729
727 # Platform specific variants 730 # Platform specific variants
728 if os.name == 'nt': 731 if os.name == 'nt':
729 demandload(globals(), "msvcrt") 732 demandload(globals(), "msvcrt")
730 nulldev = 'NUL:' 733 nulldev = 'NUL:'
731 734
849 except ImportError: 852 except ImportError:
850 pass 853 pass
851 854
852 else: 855 else:
853 nulldev = '/dev/null' 856 nulldev = '/dev/null'
854 _umask = os.umask(0)
855 os.umask(_umask)
856 857
857 def rcfiles(path): 858 def rcfiles(path):
858 rcs = [os.path.join(path, 'hgrc')] 859 rcs = [os.path.join(path, 'hgrc')]
859 rcdir = os.path.join(path, 'hgrc.d') 860 rcdir = os.path.join(path, 'hgrc.d')
860 try: 861 try: