# HG changeset patch # User Boris Feld # Date 2018-10-18 10:31:06 # Node ID 808b762679cd5b54e5af2331c18a62b5f0b65ac9 # Parent 968dd7e02ac5ed059b1dba6e883538b835dd38c5 changegroup: add a option to create bundle with full snapshot only This is easy to implement now and can be useful for benchmarking. diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py --- a/mercurial/changegroup.py +++ b/mercurial/changegroup.py @@ -698,7 +698,7 @@ def deltagroup(repo, store, nodes, ischa 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 @@ def deltagroup(repo, store, nodes, ischa 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, diff --git a/tests/test-bundle.t b/tests/test-bundle.t --- a/tests/test-bundle.t +++ b/tests/test-bundle.t @@ -905,3 +905,7 @@ Test the option that create slim bundle $ 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