changeset 40433:808b762679cd

changegroup: add a option to create bundle with full snapshot only This is easy to implement now and can be useful for benchmarking.
author Boris Feld <boris.feld@octobus.net>
date Thu, 18 Oct 2018 12:31:06 +0200
parents 968dd7e02ac5
children 3c0d5016b2be
files mercurial/changegroup.py tests/test-bundle.t
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Wed Oct 10 00:21:02 2018 +0200
+++ b/mercurial/changegroup.py	Thu Oct 18 12:31:06 2018 +0200
@@ -698,7 +698,7 @@
                                         total=len(nodes))
 
     configtarget = repo.ui.config('devel', 'bundle.delta')
-    if configtarget not in ('', 'p1'):
+    if configtarget not in ('', 'p1', 'full'):
         msg = _("""config "devel.bundle.delta" as unknown value: %s""")
         repo.ui.warn(msg % configtarget)
 
@@ -707,6 +707,8 @@
         deltamode = repository.CG_DELTAMODE_PREV
     elif configtarget == 'p1':
         deltamode = repository.CG_DELTAMODE_P1
+    elif configtarget == 'full':
+        deltamode = repository.CG_DELTAMODE_FULL
 
     revisions = store.emitrevisions(
         nodes,
--- a/tests/test-bundle.t	Wed Oct 10 00:21:02 2018 +0200
+++ b/tests/test-bundle.t	Thu Oct 18 12:31:06 2018 +0200
@@ -905,3 +905,7 @@
 
   $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg
   3 changesets found
+
+Test the option that create and no-delta's bundle
+  $ hg bundle -a --config devel.bundle.delta=full ./full.hg
+  3 changesets found