##// END OF EJS Templates
deltas: add a `debug.revlog.debug-delta` config option enable output...
marmoute -
r50122:2bcf5e14 default
parent child Browse files
Show More
@@ -584,6 +584,11 b' coreconfigitem('
584 584 default=b'',
585 585 )
586 586 coreconfigitem(
587 b'debug',
588 b'revlog.debug-delta',
589 default=False,
590 )
591 coreconfigitem(
587 592 b'defaults',
588 593 b'.*',
589 594 default=None,
@@ -1070,6 +1070,7 b' def resolverevlogstorevfsoptions(ui, req'
1070 1070 b'storage', b'revlog.optimize-delta-parent-choice'
1071 1071 )
1072 1072 options[b'deltabothparents'] = deltabothparents
1073 options[b'debug-delta'] = ui.configbool(b'debug', b'revlog.debug-delta')
1073 1074
1074 1075 issue6528 = ui.configbool(b'storage', b'revlog.issue6528.fix-incoming')
1075 1076 options[b'issue6528.fix-incoming'] = issue6528
@@ -346,6 +346,7 b' class revlog:'
346 346 self._chunkcachesize = 65536
347 347 self._maxchainlen = None
348 348 self._deltabothparents = True
349 self._debug_delta = False
349 350 self.index = None
350 351 self._docket = None
351 352 self._nodemap_docket = None
@@ -423,6 +424,8 b' class revlog:'
423 424 self._lazydeltabase = False
424 425 if self._lazydelta:
425 426 self._lazydeltabase = bool(opts.get(b'lazydeltabase', False))
427 if b'debug-delta' in opts:
428 self._debug_delta = opts[b'debug-delta']
426 429 if b'compengine' in opts:
427 430 self._compengine = opts[b'compengine']
428 431 if b'zlib.level' in opts:
@@ -2426,7 +2429,12 b' class revlog:'
2426 2429 textlen = len(rawtext)
2427 2430
2428 2431 if deltacomputer is None:
2429 deltacomputer = deltautil.deltacomputer(self)
2432 write_debug = None
2433 if self._debug_delta:
2434 write_debug = transaction._report
2435 deltacomputer = deltautil.deltacomputer(
2436 self, write_debug=write_debug
2437 )
2430 2438
2431 2439 revinfo = revlogutils.revisioninfo(
2432 2440 node,
@@ -2639,7 +2647,13 b' class revlog:'
2639 2647 empty = True
2640 2648 try:
2641 2649 with self._writing(transaction):
2642 deltacomputer = deltautil.deltacomputer(self)
2650 write_debug = None
2651 if self._debug_delta:
2652 write_debug = transaction._report
2653 deltacomputer = deltautil.deltacomputer(
2654 self,
2655 write_debug=write_debug,
2656 )
2643 2657 # loop through our set of deltas
2644 2658 for data in deltas:
2645 2659 (
@@ -3015,7 +3029,13 b' class revlog:'
3015 3029 sidedata_helpers,
3016 3030 ):
3017 3031 """perform the core duty of `revlog.clone` after parameter processing"""
3018 deltacomputer = deltautil.deltacomputer(destrevlog)
3032 write_debug = None
3033 if self._debug_delta:
3034 write_debug = tr._report
3035 deltacomputer = deltautil.deltacomputer(
3036 destrevlog,
3037 write_debug=write_debug,
3038 )
3019 3039 index = self.index
3020 3040 for rev in self:
3021 3041 entry = index[rev]
@@ -1038,3 +1038,28 b' Test the option that create slim bundle'
1038 1038 Test the option that create and no-delta's bundle
1039 1039 $ hg bundle -a --config devel.bundle.delta=full ./full.hg
1040 1040 3 changesets found
1041
1042 Test the debug output when applying delta
1043 -----------------------------------------
1044
1045 $ hg init foo
1046 $ hg -R foo unbundle ./slim.hg \
1047 > --config debug.revlog.debug-delta=yes \
1048 > --config storage.revlog.reuse-external-delta=no \
1049 > --config storage.revlog.reuse-external-delta-parent=no
1050 adding changesets
1051 DBG-DELTAS: CHANGELOG: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob)
1052 DBG-DELTAS: CHANGELOG: rev=1: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob)
1053 DBG-DELTAS: CHANGELOG: rev=2: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob)
1054 adding manifests
1055 DBG-DELTAS: MANIFESTLOG: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob)
1056 DBG-DELTAS: MANIFESTLOG: rev=1: search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=0 p2-chain-length=-1 - duration=* (glob)
1057 DBG-DELTAS: MANIFESTLOG: rev=2: search-rounds=1 try-count=1 - delta-type=delta snap-depth=0 - p1-chain-length=1 p2-chain-length=-1 - duration=* (glob)
1058 adding file changes
1059 DBG-DELTAS: FILELOG:a: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob)
1060 DBG-DELTAS: FILELOG:b: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob)
1061 DBG-DELTAS: FILELOG:c: rev=0: search-rounds=0 try-count=0 - delta-type=full snap-depth=0 - p1-chain-length=-1 p2-chain-length=-1 - duration=* (glob)
1062 added 3 changesets with 3 changes to 3 files
1063 new changesets 4fe08cd4693e:4652c276ac4f (3 drafts)
1064 (run 'hg update' to get a working copy)
1065
General Comments 0
You need to be logged in to leave comments. Login now