mercurial/cmdutil.py
changeset 22374 4509a16c76c2
parent 22373 f6a1386d540e
child 22386 54e614a297ac
equal deleted inserted replaced
22373:f6a1386d540e 22374:4509a16c76c2
  2549             for table, (xlist, msg), dobackup in disptable:
  2549             for table, (xlist, msg), dobackup in disptable:
  2550                 if abs not in table:
  2550                 if abs not in table:
  2551                     continue
  2551                     continue
  2552                 if xlist is not None:
  2552                 if xlist is not None:
  2553                     xlist.append(abs)
  2553                     xlist.append(abs)
  2554                     if (dobackup and os.path.lexists(target) and
  2554                     if (dobackup and os.path.lexists(target)
  2555                         abs in ctx and repo[None][abs].cmp(ctx[abs])):
  2555                         and repo[None][abs].cmp(ctx[abs])):
  2556                         bakname = "%s.orig" % rel
  2556                         bakname = "%s.orig" % rel
  2557                         ui.note(_('saving current version of %s as %s\n') %
  2557                         ui.note(_('saving current version of %s as %s\n') %
  2558                                 (rel, bakname))
  2558                                 (rel, bakname))
  2559                         if not opts.get('dry_run'):
  2559                         if not opts.get('dry_run'):
  2560                             util.rename(target, bakname)
  2560                             util.rename(target, bakname)