mercurial/windows.py
changeset 7949 443c0c8636ac
parent 7934 ec4784bb7d75
child 8225 46293a0c7e9f
equal deleted inserted replaced
7948:de377b1a9a84 7949:443c0c8636ac
     6 This software may be used and distributed according to the terms of
     6 This software may be used and distributed according to the terms of
     7 the GNU General Public License version 2, incorporated herein by
     7 the GNU General Public License version 2, incorporated herein by
     8 reference.
     8 reference.
     9 """
     9 """
    10 
    10 
    11 import util
       
    12 from i18n import _
    11 from i18n import _
    13 import errno, msvcrt, os, osutil, re, sys
    12 import errno, msvcrt, os, osutil, re, sys, error
    14 nulldev = 'NUL:'
    13 nulldev = 'NUL:'
    15 
    14 
    16 umask = 002
    15 umask = 002
    17 
    16 
    18 class winstdout:
    17 class winstdout:
   226             cache = dircache.setdefault(dir, dmap)
   225             cache = dircache.setdefault(dir, dmap)
   227         yield cache.get(base, None)
   226         yield cache.get(base, None)
   228 
   227 
   229 def getuser():
   228 def getuser():
   230     '''return name of current user'''
   229     '''return name of current user'''
   231     raise util.Abort(_('user name not available - set USERNAME '
   230     raise error.Abort(_('user name not available - set USERNAME '
   232                        'environment variable'))
   231                        'environment variable'))
   233 
   232 
   234 def username(uid=None):
   233 def username(uid=None):
   235     """Return the name of the user with the given uid.
   234     """Return the name of the user with the given uid.
   236 
   235