Mercurial > hg
changeset 18335:435909bf0257
merge: drop reference to file contents immediately after write
Like 7d2aaeea67ed this reduces memory usage on large merges.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 10 Jan 2013 00:45:51 +0100 |
parents | 44bda93df90e |
children | 77973b6a7b0b |
files | mercurial/merge.py |
diffstat | 1 files changed, 3 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Thu Jan 10 00:44:23 2013 +0100 +++ b/mercurial/merge.py Thu Jan 10 00:45:51 2013 +0100 @@ -405,9 +405,7 @@ elif m == "g": # get flags = a[2] repo.ui.note(_("getting %s\n") % f) - t = mctx.filectx(f).data() - repo.wwrite(f, t, flags) - t = None + repo.wwrite(f, mctx.filectx(f).data(), flags) updated += 1 if f == '.hgsubstate': # subrepo states need updating subrepo.submerge(repo, wctx, mctx, wctx, overwrite) @@ -416,13 +414,11 @@ if f: repo.ui.note(_("moving %s to %s\n") % (f, fd)) audit(f) - t = wctx.filectx(f).data() - repo.wwrite(fd, t, flags) + repo.wwrite(fd, wctx.filectx(f).data(), flags) util.unlinkpath(repo.wjoin(f)) if f2: repo.ui.note(_("getting %s to %s\n") % (f2, fd)) - t = mctx.filectx(f2).data() - repo.wwrite(fd, t, flags) + repo.wwrite(fd, mctx.filectx(f2).data(), flags) updated += 1 elif m == "dr": # divergent renames fl = a[2]