equal
deleted
inserted
replaced
39 url, |
39 url, |
40 util, |
40 util, |
41 vfs, |
41 vfs, |
42 ) |
42 ) |
43 |
43 |
44 if pycompat.osname == 'nt': |
44 if pycompat.iswindows: |
45 from . import scmwindows as scmplatform |
45 from . import scmwindows as scmplatform |
46 else: |
46 else: |
47 from . import scmposix as scmplatform |
47 from . import scmposix as scmplatform |
48 |
48 |
49 termsize = scmplatform.termsize |
49 termsize = scmplatform.termsize |
289 '''check if the user's config requests nothing, a warning, or abort for |
289 '''check if the user's config requests nothing, a warning, or abort for |
290 non-portable filenames''' |
290 non-portable filenames''' |
291 val = ui.config('ui', 'portablefilenames') |
291 val = ui.config('ui', 'portablefilenames') |
292 lval = val.lower() |
292 lval = val.lower() |
293 bval = util.parsebool(val) |
293 bval = util.parsebool(val) |
294 abort = pycompat.osname == 'nt' or lval == 'abort' |
294 abort = pycompat.iswindows or lval == 'abort' |
295 warn = bval or lval == 'warn' |
295 warn = bval or lval == 'warn' |
296 if bval is None and not (warn or abort or lval == 'ignore'): |
296 if bval is None and not (warn or abort or lval == 'ignore'): |
297 raise error.ConfigError( |
297 raise error.ConfigError( |
298 _("ui.portablefilenames value is invalid ('%s')") % val) |
298 _("ui.portablefilenames value is invalid ('%s')") % val) |
299 return abort, warn |
299 return abort, warn |