##// END OF EJS Templates
changegroup: allow to force delta to be against p1...
Boris Feld -
r40458:968dd7e0 default
parent child Browse files
Show More
@@ -697,9 +697,16 b' def deltagroup(repo, store, nodes, ischa'
697 progress = repo.ui.makeprogress(topic, unit=_('chunks'),
697 progress = repo.ui.makeprogress(topic, unit=_('chunks'),
698 total=len(nodes))
698 total=len(nodes))
699
699
700 configtarget = repo.ui.config('devel', 'bundle.delta')
701 if configtarget not in ('', 'p1'):
702 msg = _("""config "devel.bundle.delta" as unknown value: %s""")
703 repo.ui.warn(msg % configtarget)
704
700 deltamode = repository.CG_DELTAMODE_STD
705 deltamode = repository.CG_DELTAMODE_STD
701 if forcedeltaparentprev:
706 if forcedeltaparentprev:
702 deltamode = repository.CG_DELTAMODE_PREV
707 deltamode = repository.CG_DELTAMODE_PREV
708 elif configtarget == 'p1':
709 deltamode = repository.CG_DELTAMODE_P1
703
710
704 revisions = store.emitrevisions(
711 revisions = store.emitrevisions(
705 nodes,
712 nodes,
@@ -329,6 +329,9 b" coreconfigitem('devel', 'all-warnings',"
329 coreconfigitem('devel', 'bundle2.debug',
329 coreconfigitem('devel', 'bundle2.debug',
330 default=False,
330 default=False,
331 )
331 )
332 coreconfigitem('devel', 'bundle.delta',
333 default='',
334 )
332 coreconfigitem('devel', 'cache-vfs',
335 coreconfigitem('devel', 'cache-vfs',
333 default=None,
336 default=None,
334 )
337 )
@@ -42,6 +42,7 b' REVISION_FLAGS_KNOWN = ('
42 CG_DELTAMODE_STD = b'default'
42 CG_DELTAMODE_STD = b'default'
43 CG_DELTAMODE_PREV = b'previous'
43 CG_DELTAMODE_PREV = b'previous'
44 CG_DELTAMODE_FULL = b'fulltext'
44 CG_DELTAMODE_FULL = b'fulltext'
45 CG_DELTAMODE_P1 = b'p1'
45
46
46 class ipeerconnection(interfaceutil.Interface):
47 class ipeerconnection(interfaceutil.Interface):
47 """Represents a "connection" to a repository.
48 """Represents a "connection" to a repository.
@@ -373,6 +373,9 b' def emitrevisions(store, nodes, nodesord'
373 # We're instructed to send fulltext. Honor that.
373 # We're instructed to send fulltext. Honor that.
374 elif deltamode == repository.CG_DELTAMODE_FULL:
374 elif deltamode == repository.CG_DELTAMODE_FULL:
375 baserev = nullrev
375 baserev = nullrev
376 # We're instructed to use p1. Honor that
377 elif deltamode == repository.CG_DELTAMODE_P1:
378 baserev = p1rev
376
379
377 # There is a delta in storage. We try to use that because it
380 # There is a delta in storage. We try to use that because it
378 # amounts to effectively copying data from storage and is
381 # amounts to effectively copying data from storage and is
@@ -900,3 +900,8 b" the warning shouldn't be emitted"
900 $ hg update -R ../update2bundled.hg -r 0
900 $ hg update -R ../update2bundled.hg -r 0
901 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
901 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
902 #endif
902 #endif
903
904 Test the option that create slim bundle
905
906 $ hg bundle -a --config devel.bundle.delta=p1 ./slim.hg
907 3 changesets found
General Comments 0
You need to be logged in to leave comments. Login now