mercurial/merge.py
changeset 49959 c166b212bdee
parent 49911 c7a04bfabd4d
child 49960 7a8bfc05b691
equal deleted inserted replaced
49958:376395868b7b 49959:c166b212bdee
  2153                             getfiledata[a[0]] = None
  2153                             getfiledata[a[0]] = None
  2154 
  2154 
  2155             assert len(getfiledata) == (
  2155             assert len(getfiledata) == (
  2156                 mresult.len((mergestatemod.ACTION_GET,)) if wantfiledata else 0
  2156                 mresult.len((mergestatemod.ACTION_GET,)) if wantfiledata else 0
  2157             )
  2157             )
  2158             with repo.dirstate.parentchange():
  2158             with repo.dirstate.parentchange(repo):
  2159                 ### Filter Filedata
  2159                 ### Filter Filedata
  2160                 #
  2160                 #
  2161                 # We gathered "cache" information for the clean file while
  2161                 # We gathered "cache" information for the clean file while
  2162                 # updating them: mtime, size and mode.
  2162                 # updating them: mtime, size and mode.
  2163                 #
  2163                 #
  2375     if wctx.isinmemory():
  2375     if wctx.isinmemory():
  2376         wctx.setparents(pctx.node(), pother)
  2376         wctx.setparents(pctx.node(), pother)
  2377         # fix up dirstate for copies and renames
  2377         # fix up dirstate for copies and renames
  2378         copies.graftcopies(wctx, ctx, base)
  2378         copies.graftcopies(wctx, ctx, base)
  2379     else:
  2379     else:
  2380         with repo.dirstate.parentchange():
  2380         with repo.dirstate.parentchange(repo):
  2381             repo.setparents(pctx.node(), pother)
  2381             repo.setparents(pctx.node(), pother)
  2382             repo.dirstate.write(repo.currenttransaction())
  2382             repo.dirstate.write(repo.currenttransaction())
  2383             # fix up dirstate for copies and renames
  2383             # fix up dirstate for copies and renames
  2384             copies.graftcopies(wctx, ctx, base)
  2384             copies.graftcopies(wctx, ctx, base)
  2385     return stats
  2385     return stats