# HG changeset patch # User Matt Mackall # Date 2010-08-05 21:17:17 # Node ID 7d2aaeea67ed89f40f5ff739c8e77ffaa286c5da # Parent 6ccd130eab0e9e425e8459754619ad75dffcdf56 merge: drop reference to file contents after write This reduces memory usage on large consecutive gets. diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -323,6 +323,7 @@ def applyupdates(repo, action, wctx, mct repo.ui.note(_("getting %s\n") % f) t = mctx.filectx(f).data() repo.wwrite(f, t, flags) + t = None updated += 1 if f == '.hgsubstate': # subrepo states need updating subrepo.submerge(repo, wctx, mctx, wctx)