merge: drop reference to file contents after write stable
authorMatt Mackall <mpm@selenic.com>
Thu, 05 Aug 2010 16:17:17 -0500
branchstable
changeset 11755 7d2aaeea67ed
parent 11754 6ccd130eab0e
child 11756 0299240b849b
merge: drop reference to file contents after write This reduces memory usage on large consecutive gets.
mercurial/merge.py
--- a/mercurial/merge.py	Thu Aug 05 16:17:17 2010 -0500
+++ b/mercurial/merge.py	Thu Aug 05 16:17:17 2010 -0500
@@ -323,6 +323,7 @@
             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)