mercurial/cmdutil.py
changeset 22398 402e5fba6509
parent 22397 1db04829bdc1
child 22405 6f63c47cbb86
equal deleted inserted replaced
22397:1db04829bdc1 22398:402e5fba6509
  2574             for table, (xlist, msg), dobackup in disptable:
  2574             for table, (xlist, msg), dobackup in disptable:
  2575                 if abs not in table:
  2575                 if abs not in table:
  2576                     continue
  2576                     continue
  2577                 if xlist is not None:
  2577                 if xlist is not None:
  2578                     xlist.append(abs)
  2578                     xlist.append(abs)
  2579                     if (dobackup and os.path.lexists(target)
  2579                     if (dobackup and wctx[abs].cmp(ctx[abs])):
  2580                         and wctx[abs].cmp(ctx[abs])):
       
  2581                         bakname = "%s.orig" % rel
  2580                         bakname = "%s.orig" % rel
  2582                         ui.note(_('saving current version of %s as %s\n') %
  2581                         ui.note(_('saving current version of %s as %s\n') %
  2583                                 (rel, bakname))
  2582                                 (rel, bakname))
  2584                         if not opts.get('dry_run'):
  2583                         if not opts.get('dry_run'):
  2585                             util.rename(target, bakname)
  2584                             util.rename(target, bakname)