Comments
Patch
@@ -697,9 +697,16 @@ def deltagroup(repo, store, nodes, ischa
progress = repo.ui.makeprogress(topic, unit=_('chunks'),
total=len(nodes))
+ configtarget = repo.ui.config('devel', 'bundle.delta')
+ if configtarget not in ('', 'p1'):
+ msg = _("""config "devel.bundle.delta" as unknown value: %s""")
+ repo.ui.warn(msg % configtarget)
+
deltamode = repository.CG_DELTAMODE_STD
if forcedeltaparentprev:
deltamode = repository.CG_DELTAMODE_PREV
+ elif configtarget == 'p1':
+ deltamode = repository.CG_DELTAMODE_P1
revisions = store.emitrevisions(
nodes,
@@ -329,6 +329,9 @@ coreconfigitem('devel', 'all-warnings',
coreconfigitem('devel', 'bundle2.debug',
default=False,
)
+coreconfigitem('devel', 'bundle.delta',
+ default='',
+)
coreconfigitem('devel', 'cache-vfs',
default=None,
)
@@ -40,6 +40,7 @@ REVISION_FLAGS_KNOWN = (
CG_DELTAMODE_STD = b'default'
CG_DELTAMODE_PREV = b'previous'
CG_DELTAMODE_FULL = b'fulltext'
+CG_DELTAMODE_P1 = b'p1'
class ipeerconnection(interfaceutil.Interface):
"""Represents a "connection" to a repository.
@@ -372,6 +372,9 @@ def emitrevisions(store, nodes, nodesord
# We're instructed to send fulltext. Honor that.
elif deltamode == repository.CG_DELTAMODE_FULL:
baserev = nullrev
+ # We're instructed to use p1. Honor that
+ elif deltamode == repository.CG_DELTAMODE_P1:
+ baserev = p1rev
# There is a delta in storage. We try to use that because it
# amounts to effectively copying data from storage and is
@@ -900,3 +900,8 @@ the warning shouldn't be emitted
$ hg update -R ../update2bundled.hg -r 0
0 files updated, 0 files merged, 2 files removed, 0 files unresolved
#endif
+
+Test the option that create slim bundle
+
+ $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg
+ 3 changesets found