equal
deleted
inserted
replaced
280 ui.warn(_("warning: %s\n") % msg) |
280 ui.warn(_("warning: %s\n") % msg) |
281 |
281 |
282 def checkportabilityalert(ui): |
282 def checkportabilityalert(ui): |
283 '''check if the user's config requests nothing, a warning, or abort for |
283 '''check if the user's config requests nothing, a warning, or abort for |
284 non-portable filenames''' |
284 non-portable filenames''' |
285 val = ui.config('ui', 'portablefilenames', 'warn') |
285 val = ui.config('ui', 'portablefilenames') |
286 lval = val.lower() |
286 lval = val.lower() |
287 bval = util.parsebool(val) |
287 bval = util.parsebool(val) |
288 abort = pycompat.osname == 'nt' or lval == 'abort' |
288 abort = pycompat.osname == 'nt' or lval == 'abort' |
289 warn = bval or lval == 'warn' |
289 warn = bval or lval == 'warn' |
290 if bval is None and not (warn or abort or lval == 'ignore'): |
290 if bval is None and not (warn or abort or lval == 'ignore'): |
551 '''customize where .orig files are created |
551 '''customize where .orig files are created |
552 |
552 |
553 Fetch user defined path from config file: [ui] origbackuppath = <path> |
553 Fetch user defined path from config file: [ui] origbackuppath = <path> |
554 Fall back to default (filepath) if not specified |
554 Fall back to default (filepath) if not specified |
555 ''' |
555 ''' |
556 origbackuppath = ui.config('ui', 'origbackuppath', None) |
556 origbackuppath = ui.config('ui', 'origbackuppath') |
557 if origbackuppath is None: |
557 if origbackuppath is None: |
558 return filepath + ".orig" |
558 return filepath + ".orig" |
559 |
559 |
560 filepathfromroot = os.path.relpath(filepath, start=repo.root) |
560 filepathfromroot = os.path.relpath(filepath, start=repo.root) |
561 fullorigpath = repo.wjoin(origbackuppath, filepathfromroot) |
561 fullorigpath = repo.wjoin(origbackuppath, filepathfromroot) |