largefiles: force an on-disk merge
authorPhil Cohen <phillco@fb.com>
Thu, 14 Sep 2017 13:14:32 -0700
changeset 34303 575097b4dce0
parent 34302 440ece43024c
child 34304 ae510d9691ef
largefiles: force an on-disk merge Largefiles isn't a good candidate for in-memory merge (it uses a custom dirstate, matcher, and the files might not fit in memory) so have it always run an old-style merge. Differential Revision: https://phab.mercurial-scm.org/D683
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Thu Sep 14 13:14:32 2017 -0700
+++ b/hgext/largefiles/overrides.py	Thu Sep 14 13:14:32 2017 -0700
@@ -1432,7 +1432,10 @@
         lfdirstate.write()
 
         oldstandins = lfutil.getstandinsstate(repo)
-
+        # Make sure the merge runs on disk, not in-memory. largefiles is not a
+        # good candidate for in-memory merge (large files, custom dirstate,
+        # matcher usage).
+        kwargs['wc'] = repo[None]
         result = orig(repo, node, branchmerge, force, *args, **kwargs)
 
         newstandins = lfutil.getstandinsstate(repo)