Mercurial > hg-stable
diff mercurial/util.py @ 2250:45aef5ddcdbe
windows: revlog.lazyparser not always safe to use.
can not use on windows < nt or if win32 api not available.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 10 May 2006 11:10:18 -0700 |
parents | 4a069064a39b |
children | 3d48eb68f3ee |
line wrap: on
line diff
--- a/mercurial/util.py Wed May 10 10:32:24 2006 -0700 +++ b/mercurial/util.py Wed May 10 11:10:18 2006 -0700 @@ -489,6 +489,13 @@ posixfile = file +def is_win_9x(): + '''return true if run on windows 95, 98 or me.''' + try: + return sys.getwindowsversion()[3] == 1 + except AttributeError: + return os.name == 'nt' and 'command' in os.environ.get('comspec', '') + # Platform specific variants if os.name == 'nt': demandload(globals(), "msvcrt") @@ -570,6 +577,8 @@ try: # override functions with win32 versions if possible from util_win32 import * + if not is_win_9x(): + posixfile = posixfile_nt except ImportError: pass