comparison hgext/win32mbcs.py @ 30616:6f9fcd29e290

py3: replace os.sep with pycompat.ossep (part 4 of 4)
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 17 Dec 2016 20:24:46 +0530
parents 8a9681b963a3
children 7a3e67bfa417
comparison
equal deleted inserted replaced
30615:bb77654dc7ae 30616:6f9fcd29e290
51 51
52 from mercurial.i18n import _ 52 from mercurial.i18n import _
53 from mercurial import ( 53 from mercurial import (
54 encoding, 54 encoding,
55 error, 55 error,
56 pycompat,
56 ) 57 )
57 58
58 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for 59 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
59 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should 60 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
60 # be specifying the version(s) of Mercurial they are tested with, or 61 # be specifying the version(s) of Mercurial they are tested with, or
95 try: 96 try:
96 us = decode(s) 97 us = decode(s)
97 except UnicodeError: 98 except UnicodeError:
98 us = s 99 us = s
99 if us and us[-1] not in ':/\\': 100 if us and us[-1] not in ':/\\':
100 s += os.sep 101 s += pycompat.ossep
101 return s 102 return s
102 103
103 104
104 def basewrapper(func, argtype, enc, dec, args, kwds): 105 def basewrapper(func, argtype, enc, dec, args, kwds):
105 # check check already converted, then call original 106 # check check already converted, then call original