diff hgext/lfs/__init__.py @ 45784:74271829ddc0

clonebundles: move a bundle of clone bundle related code to a new module In the process on general clone bundle automatically, we need to make some function available more widely. This is a good opportunity to extract a significant amount of code from `mercurial.exchange` into a new `mercurial.bundlecaches`. This make `mercurial.exchange` move under the 3K line range (hooray…). The module is called `bundlecaches` because I expect it to be eventually useful for more than just clone bundle (like pull bunbles). Differential Revision: https://phab.mercurial-scm.org/D9208
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 15 Oct 2020 15:57:36 +0200
parents a03c177a4679
children 89a2afe31e82
line wrap: on
line diff
--- a/hgext/lfs/__init__.py	Wed Jul 01 15:14:59 2020 +0530
+++ b/hgext/lfs/__init__.py	Thu Oct 15 15:57:36 2020 +0200
@@ -127,10 +127,10 @@
 from mercurial.i18n import _
 
 from mercurial import (
+    bundlecaches,
     config,
     context,
     error,
-    exchange,
     extensions,
     exthelper,
     filelog,
@@ -351,7 +351,7 @@
     # 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.
-    exchange._bundlespeccontentopts[b"v2"][b"cg.version"] = b"03"
+    bundlecaches._bundlespeccontentopts[b"v2"][b"cg.version"] = b"03"
 
 
 @eh.filesetpredicate(b'lfs()')