diff hgext/lfs/wrapper.py @ 35215:8887a45e3384

lfs: enable the extension locally after converting to an 'lfs' repo This is consistent with clone and share in the previous commits.
author Matt Harbison <matt_harbison@yahoo.com>
date Sun, 26 Nov 2017 21:14:48 -0500
parents a8c778b2a689
children 9eb19b13e92a
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py	Thu Nov 16 21:01:21 2017 -0500
+++ b/hgext/lfs/wrapper.py	Sun Nov 26 21:14:48 2017 -0500
@@ -184,6 +184,10 @@
                         self.repo.requirements.add('lfs')
                         self.repo._writerequirements()
 
+                        # Permanently enable lfs locally
+                        with self.repo.vfs('hgrc', 'a', text=True) as fp:
+                            fp.write('\n[extensions]\nlfs=\n')
+
                 return node
 
         sink.__class__ = lfssink