mercurial/commands.py
changeset 4276 cb6107f78b92
parent 4274 f38f90a177dc
parent 4262 ad33eeeeb50a
child 4306 d4f0405fadac
equal deleted inserted replaced
4275:73c918c71300 4276:cb6107f78b92
  2253     for abs, (rel, exact) in entries:
  2253     for abs, (rel, exact) in entries:
  2254         mfentry = mf.get(abs)
  2254         mfentry = mf.get(abs)
  2255         def handle(xlist, dobackup):
  2255         def handle(xlist, dobackup):
  2256             xlist[0].append(abs)
  2256             xlist[0].append(abs)
  2257             update[abs] = 1
  2257             update[abs] = 1
  2258             if dobackup and not opts['no_backup'] and os.path.exists(rel):
  2258             if (dobackup and not opts['no_backup'] and
       
  2259                 (os.path.islink(rel) or os.path.exists(rel))):
  2259                 bakname = "%s.orig" % rel
  2260                 bakname = "%s.orig" % rel
  2260                 ui.note(_('saving current version of %s as %s\n') %
  2261                 ui.note(_('saving current version of %s as %s\n') %
  2261                         (rel, bakname))
  2262                         (rel, bakname))
  2262                 if not opts.get('dry_run'):
  2263                 if not opts.get('dry_run'):
  2263                     util.copyfile(rel, bakname)
  2264                     util.copyfile(rel, bakname)