diff hgext/largefiles/overrides.py @ 39854:823a580448d7

largefiles: automatically load largefiles extension when required (BC) This is very similar to what we just did for LFS but for largefiles. See recent commit messages for the rationale here. Differential Revision: https://phab.mercurial-scm.org/D4713
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 20 Sep 2018 15:30:00 -0700
parents d3d4b4b5f725
children 3d76a8e627a6
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Thu Sep 20 15:18:13 2018 -0700
+++ b/hgext/largefiles/overrides.py	Thu Sep 20 15:30:00 2018 -0700
@@ -889,11 +889,6 @@
         if not repo:
             return result
 
-        # If largefiles is required for this repo, permanently enable it locally
-        if 'largefiles' in repo.requirements:
-            repo.vfs.append('hgrc',
-                            util.tonativeeol('\n[extensions]\nlargefiles=\n'))
-
         # Caching is implicitly limited to 'rev' option, since the dest repo was
         # truncated at that point.  The user may expect a download count with
         # this option, so attempt whether or not this is a largefile repo.
@@ -905,14 +900,6 @@
 
     return result
 
-def hgpostshare(orig, sourcerepo, destrepo, defaultpath=None):
-    orig(sourcerepo, destrepo, defaultpath=defaultpath)
-
-    # If largefiles is required for this repo, permanently enable it locally
-    if 'largefiles' in destrepo.requirements:
-        destrepo.vfs.append('hgrc',
-                            util.tonativeeol('\n[extensions]\nlargefiles=\n'))
-
 def overriderebase(orig, ui, repo, **opts):
     if not util.safehasattr(repo, '_largefilesenabled'):
         return orig(ui, repo, **opts)