equal
deleted
inserted
replaced
16 from i18n import _ |
16 from i18n import _ |
17 import error, osutil, encoding |
17 import error, osutil, encoding |
18 import errno, re, shutil, sys, tempfile, traceback |
18 import errno, re, shutil, sys, tempfile, traceback |
19 import os, time, calendar, textwrap, unicodedata, signal |
19 import os, time, calendar, textwrap, unicodedata, signal |
20 import imp, socket, urllib |
20 import imp, socket, urllib |
|
21 |
|
22 if os.name == 'nt': |
|
23 from windows import * |
|
24 else: |
|
25 from posix import * |
21 |
26 |
22 # Python compatibility |
27 # Python compatibility |
23 |
28 |
24 def sha1(s): |
29 def sha1(s): |
25 return _fastsha1(s) |
30 return _fastsha1(s) |
475 return _("filename ends with '%s', which is not allowed " |
480 return _("filename ends with '%s', which is not allowed " |
476 "on Windows") % t |
481 "on Windows") % t |
477 |
482 |
478 if os.name == 'nt': |
483 if os.name == 'nt': |
479 checkosfilename = checkwinfilename |
484 checkosfilename = checkwinfilename |
480 from windows import * |
|
481 else: |
|
482 from posix import * |
|
483 |
485 |
484 def makelock(info, pathname): |
486 def makelock(info, pathname): |
485 try: |
487 try: |
486 return os.symlink(info, pathname) |
488 return os.symlink(info, pathname) |
487 except OSError, why: |
489 except OSError, why: |