Mercurial > hg > mercurial-crew-with-dirclash
diff mercurial/util.py @ 2262:3d48eb68f3ee
merge with crew.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Thu, 11 May 2006 08:48:52 -0700 |
parents | 20cf545b4725 45aef5ddcdbe |
children | 2f64cbaa1e92 |
line wrap: on
line diff
--- a/mercurial/util.py +++ b/mercurial/util.py @@ -489,6 +489,13 @@ def fstat(fp): 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 @@ if os.name == 'nt': try: # override functions with win32 versions if possible from util_win32 import * + if not is_win_9x(): + posixfile = posixfile_nt except ImportError: pass