mercurial/cmdutil.py
changeset 41591 4d4842445afc
parent 41576 15f63ac122ea
child 41597 9e545c9a4dfe
equal deleted inserted replaced
41590:349c8879becd 41591:4d4842445afc
  3016                         # .orig files (issue4793)
  3016                         # .orig files (issue4793)
  3017                         if dobackup == backupinteractive:
  3017                         if dobackup == backupinteractive:
  3018                             tobackup.add(abs)
  3018                             tobackup.add(abs)
  3019                         elif (backup <= dobackup or wctx[abs].cmp(ctx[abs])):
  3019                         elif (backup <= dobackup or wctx[abs].cmp(ctx[abs])):
  3020                             bakname = scmutil.origpath(ui, repo, rel)
  3020                             bakname = scmutil.origpath(ui, repo, rel)
       
  3021                             relbakname = os.path.relpath(bakname)
  3021                             ui.note(_('saving current version of %s as %s\n') %
  3022                             ui.note(_('saving current version of %s as %s\n') %
  3022                                     (rel, bakname))
  3023                                     (rel, relbakname))
  3023                             if not opts.get('dry_run'):
  3024                             if not opts.get('dry_run'):
  3024                                 if interactive:
  3025                                 if interactive:
  3025                                     util.copyfile(target, bakname)
  3026                                     util.copyfile(target, bakname)
  3026                                 else:
  3027                                 else:
  3027                                     util.rename(target, bakname)
  3028                                     util.rename(target, bakname)