diff hgext/lfs/__init__.py @ 35213:24aa4853c031

lfs: enable the extension locally after cloning a repo with 'lfs' requirement We do the same thing on clone for the largefiles extension, as a convenience. Similar to largefiles, it's probably safer to only enable this extension on a per repo basis because it is trivial to add an lfs file. And that gives the repository some centralized VCS characteristics.
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 16 Nov 2017 20:23:20 -0500
parents f8f939a2926c
children a8c778b2a689
line wrap: on
line diff
--- a/hgext/lfs/__init__.py	Sat Dec 02 16:29:49 2017 +0900
+++ b/hgext/lfs/__init__.py	Thu Nov 16 20:23:20 2017 -0500
@@ -37,6 +37,7 @@
     exchange,
     extensions,
     filelog,
+    hg,
     localrepo,
     registrar,
     revlog,
@@ -151,6 +152,8 @@
         ),
     )
 
+    wrapfunction(hg, 'clone', wrapper.hgclone)
+
     # Make bundle choose changegroup3 instead of changegroup2. This affects
     # "hg bundle" command. Note: it does not cover all bundle formats like
     # "packed1". Using "packed1" with lfs will likely cause trouble.