hgext/largefiles/overrides.py
changeset 24029 e1dbe0b215ae
parent 24006 42fa7eeb858e
child 24133 79c2c29c71ae
--- a/hgext/largefiles/overrides.py	Tue Feb 03 16:24:32 2015 -0800
+++ b/hgext/largefiles/overrides.py	Mon Feb 02 19:58:41 2015 -0500
@@ -821,6 +821,14 @@
         sourcerepo, destrepo = result
         repo = destrepo.local()
 
+        # If largefiles is required for this repo, permanently enable it locally
+        if 'largefiles' in repo.requirements:
+            fp = repo.vfs('hgrc', 'a', text=True)
+            try:
+                fp.write('\n[extensions]\nlargefiles=\n')
+            finally:
+                fp.close()
+
         # 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.