comparison mercurial/util.py @ 4343:8b4d4f84b739

Merge with crew
author Matt Mackall <mpm@selenic.com>
date Thu, 12 Apr 2007 12:42:22 -0500
parents 1cc5fc1d0994 f4a1eac52d43
children d7ad1e42a368
comparison
equal deleted inserted replaced
4341:f4a1eac52d43 4343:8b4d4f84b739
805 '''return an is_link() function with default to fallback''' 805 '''return an is_link() function with default to fallback'''
806 if checklink(path): 806 if checklink(path):
807 return lambda x: os.path.islink(os.path.join(path, x)) 807 return lambda x: os.path.islink(os.path.join(path, x))
808 return fallback 808 return fallback
809 809
810 _umask = os.umask(0)
811 os.umask(_umask)
812
810 # Platform specific variants 813 # Platform specific variants
811 if os.name == 'nt': 814 if os.name == 'nt':
812 import msvcrt 815 import msvcrt
813 nulldev = 'NUL:' 816 nulldev = 'NUL:'
814 817
931 except ImportError: 934 except ImportError:
932 pass 935 pass
933 936
934 else: 937 else:
935 nulldev = '/dev/null' 938 nulldev = '/dev/null'
936 _umask = os.umask(0)
937 os.umask(_umask)
938 939
939 def rcfiles(path): 940 def rcfiles(path):
940 rcs = [os.path.join(path, 'hgrc')] 941 rcs = [os.path.join(path, 'hgrc')]
941 rcdir = os.path.join(path, 'hgrc.d') 942 rcdir = os.path.join(path, 'hgrc.d')
942 try: 943 try: