diff tests/test-bundle2-format.t @ 24641:60fecc5b14a4

unbundle20: retrieve unbundler instances through a factory function To support multiple bundle2 formats, we will need a function returning the proper unbundler according to the header. We introduce such aa function and change the usage in the code base. The function will get smarter in later changesets. This is somewhat similar to the dispatching we do for 'HG10' and 'HG11'. The main target is to allow HG2Y support in an extension to ease transition of companies using the experimental protocol in production (yeah...) But I've no doubt this will be useful when playing with a future HG21.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 06 Apr 2015 16:04:33 -0700
parents 5827ad0b849e
children e0e28e910fa3
line wrap: on
line diff
--- a/tests/test-bundle2-format.t	Mon Apr 06 15:40:12 2015 -0700
+++ b/tests/test-bundle2-format.t	Mon Apr 06 16:04:33 2015 -0700
@@ -157,7 +157,7 @@
   >         lock = repo.lock()
   >         tr = repo.transaction('processbundle')
   >         try:
-  >             unbundler = bundle2.unbundle20(ui, sys.stdin)
+  >             unbundler = bundle2.getunbundler(ui, sys.stdin)
   >             op = bundle2.processbundle(repo, unbundler, lambda: tr)
   >             tr.close()
   >         except error.BundleValueError, exc:
@@ -183,7 +183,7 @@
   > @command('statbundle2', [], '')
   > def cmdstatbundle2(ui, repo):
   >     """print statistic on the bundle2 container read from stdin"""
-  >     unbundler = bundle2.unbundle20(ui, sys.stdin)
+  >     unbundler = bundle2.getunbundler(ui, sys.stdin)
   >     try:
   >         params = unbundler.params
   >     except error.BundleValueError, exc: