diff mercurial/commands.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 88a47cbf063c
children 4db5671d57d9
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jul 01 15:14:59 2020 +0530
+++ b/mercurial/commands.py	Thu Oct 15 15:57:36 2020 +0200
@@ -26,6 +26,7 @@
     archival,
     bookmarks,
     bundle2,
+    bundlecaches,
     changegroup,
     cmdutil,
     copies,
@@ -1544,7 +1545,9 @@
 
     bundletype = opts.get(b'type', b'bzip2').lower()
     try:
-        bundlespec = exchange.parsebundlespec(repo, bundletype, strict=False)
+        bundlespec = bundlecaches.parsebundlespec(
+            repo, bundletype, strict=False
+        )
     except error.UnsupportedBundleSpecification as e:
         raise error.Abort(
             pycompat.bytestr(e),