mercurial/merge.py
changeset 44939 818b4f19ef23
parent 44856 b7808443ed6a
child 44999 d1471dbbdd63
equal deleted inserted replaced
44938:3d409f4ff46b 44939:818b4f19ef23
   458     # Rename all local conflicting files that have not been deleted.
   458     # Rename all local conflicting files that have not been deleted.
   459     for p in localconflicts:
   459     for p in localconflicts:
   460         if p not in deletedfiles:
   460         if p not in deletedfiles:
   461             ctxname = bytes(wctx).rstrip(b'+')
   461             ctxname = bytes(wctx).rstrip(b'+')
   462             pnew = util.safename(p, ctxname, wctx, set(actions.keys()))
   462             pnew = util.safename(p, ctxname, wctx, set(actions.keys()))
       
   463             porig = wctx[p].copysource() or p
   463             actions[pnew] = (
   464             actions[pnew] = (
   464                 mergestatemod.ACTION_PATH_CONFLICT_RESOLVE,
   465                 mergestatemod.ACTION_PATH_CONFLICT_RESOLVE,
   465                 (p,),
   466                 (p, porig),
   466                 b'local path conflict',
   467                 b'local path conflict',
   467             )
   468             )
   468             actions[p] = (
   469             actions[p] = (
   469                 mergestatemod.ACTION_PATH_CONFLICT,
   470                 mergestatemod.ACTION_PATH_CONFLICT,
   470                 (pnew, b'l'),
   471                 (pnew, b'l'),
  1278     removed = len(actions[mergestatemod.ACTION_REMOVE])
  1279     removed = len(actions[mergestatemod.ACTION_REMOVE])
  1279 
  1280 
  1280     # resolve path conflicts (must come before getting)
  1281     # resolve path conflicts (must come before getting)
  1281     for f, args, msg in actions[mergestatemod.ACTION_PATH_CONFLICT_RESOLVE]:
  1282     for f, args, msg in actions[mergestatemod.ACTION_PATH_CONFLICT_RESOLVE]:
  1282         repo.ui.debug(b" %s: %s -> pr\n" % (f, msg))
  1283         repo.ui.debug(b" %s: %s -> pr\n" % (f, msg))
  1283         (f0,) = args
  1284         (f0, origf0) = args
  1284         if wctx[f0].lexists():
  1285         if wctx[f0].lexists():
  1285             repo.ui.note(_(b"moving %s to %s\n") % (f0, f))
  1286             repo.ui.note(_(b"moving %s to %s\n") % (f0, f))
  1286             wctx[f].audit()
  1287             wctx[f].audit()
  1287             wctx[f].write(wctx.filectx(f0).data(), wctx.filectx(f0).flags())
  1288             wctx[f].write(wctx.filectx(f0).data(), wctx.filectx(f0).flags())
  1288             wctx[f0].remove()
  1289             wctx[f0].remove()