Show More
@@ -661,12 +661,23 b' def _rawgroups(revlog, p1, p2, cachedelt' | |||||
661 | yield parents |
|
661 | yield parents | |
662 |
|
662 | |||
663 | if sparse and parents: |
|
663 | if sparse and parents: | |
|
664 | snapshots = collections.defaultdict(list) # map: base-rev: snapshot-rev | |||
664 | # See if we can use an existing snapshot in the parent chains to use as |
|
665 | # See if we can use an existing snapshot in the parent chains to use as | |
665 | # a base for a new intermediate-snapshot |
|
666 | # a base for a new intermediate-snapshot | |
666 | bases = [] |
|
667 | # | |
|
668 | # search for snapshot in parents delta chain | |||
|
669 | # map: snapshot-level: snapshot-rev | |||
|
670 | parents_snaps = collections.defaultdict(set) | |||
667 | for p in parents: |
|
671 | for p in parents: | |
668 |
|
|
672 | for idx, s in enumerate(deltachain(p)): | |
669 | yield tuple(sorted(bases)) |
|
673 | if not revlog.issnapshot(s): | |
|
674 | break | |||
|
675 | parents_snaps[idx].add(s) | |||
|
676 | # Test them as possible intermediate snapshot base | |||
|
677 | # We test them from highest to lowest level. High level one are more | |||
|
678 | # likely to result in small delta | |||
|
679 | for idx, snaps in sorted(parents_snaps.items(), reverse=True): | |||
|
680 | yield tuple(sorted(snaps)) | |||
670 | # No suitable base found in the parent chain, search if any full |
|
681 | # No suitable base found in the parent chain, search if any full | |
671 | # snapshots emitted since parent's base would be a suitable base for an |
|
682 | # snapshots emitted since parent's base would be a suitable base for an | |
672 | # intermediate snapshot. |
|
683 | # intermediate snapshot. | |
@@ -675,8 +686,7 b' def _rawgroups(revlog, p1, p2, cachedelt' | |||||
675 | # revisions instead of starting our own. Without such re-use, |
|
686 | # revisions instead of starting our own. Without such re-use, | |
676 | # topological branches would keep reopening new full chains. Creating |
|
687 | # topological branches would keep reopening new full chains. Creating | |
677 | # more and more snapshot as the repository grow. |
|
688 | # more and more snapshot as the repository grow. | |
678 |
snapfloor = min( |
|
689 | snapfloor = min(parents_snaps[0]) + 1 | |
679 | snapshots = collections.defaultdict(list) |
|
|||
680 | _findsnapshots(revlog, snapshots, snapfloor) |
|
690 | _findsnapshots(revlog, snapshots, snapfloor) | |
681 | yield tuple(snapshots[nullrev]) |
|
691 | yield tuple(snapshots[nullrev]) | |
682 |
|
692 |
@@ -77,7 +77,7 b' repeatedly while some of it changes rare' | |||||
77 |
|
77 | |||
78 |
|
78 | |||
79 | $ f -s .hg/store/data/*.d |
|
79 | $ f -s .hg/store/data/*.d | |
80 |
.hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=6 |
|
80 | .hg/store/data/_s_p_a_r_s_e-_r_e_v_l_o_g-_t_e_s_t-_f_i_l_e.d: size=63812493 | |
81 | $ hg debugrevlog * |
|
81 | $ hg debugrevlog * | |
82 | format : 1 |
|
82 | format : 1 | |
83 | flags : generaldelta |
|
83 | flags : generaldelta | |
@@ -89,39 +89,45 b' repeatedly while some of it changes rare' | |||||
89 | empty : 0 ( 0.00%) |
|
89 | empty : 0 ( 0.00%) | |
90 | text : 0 (100.00%) |
|
90 | text : 0 (100.00%) | |
91 | delta : 0 (100.00%) |
|
91 | delta : 0 (100.00%) | |
92 |
snapshot : 1 |
|
92 | snapshot : 179 ( 3.58%) | |
93 | lvl-0 : 4 ( 0.08%) |
|
93 | lvl-0 : 4 ( 0.08%) | |
94 |
lvl-1 : |
|
94 | lvl-1 : 49 ( 0.98%) | |
95 |
lvl-2 : |
|
95 | lvl-2 : 56 ( 1.12%) | |
96 | deltas : 4875 (97.48%) |
|
96 | lvl-3 : 63 ( 1.26%) | |
97 | revision size : 67810463 |
|
97 | lvl-4 : 7 ( 0.14%) | |
98 | snapshot : 14373347 (21.20%) |
|
98 | deltas : 4822 (96.42%) | |
99 | lvl-0 : 804235 ( 1.19%) |
|
99 | revision size : 63812493 | |
100 | lvl-1 : 13535903 (19.96%) |
|
100 | snapshot : 10745878 (16.84%) | |
101 |
lvl- |
|
101 | lvl-0 : 804204 ( 1.26%) | |
102 | deltas : 53437116 (78.80%) |
|
102 | lvl-1 : 4986508 ( 7.81%) | |
|
103 | lvl-2 : 2858810 ( 4.48%) | |||
|
104 | lvl-3 : 1958906 ( 3.07%) | |||
|
105 | lvl-4 : 137450 ( 0.22%) | |||
|
106 | deltas : 53066615 (83.16%) | |||
103 |
|
107 | |||
104 | chunks : 5001 |
|
108 | chunks : 5001 | |
105 | 0x78 (x) : 5001 (100.00%) |
|
109 | 0x78 (x) : 5001 (100.00%) | |
106 |
chunks size : 6 |
|
110 | chunks size : 63812493 | |
107 |
0x78 (x) : 6 |
|
111 | 0x78 (x) : 63812493 (100.00%) | |
108 |
|
112 | |||
109 |
avg chain length : 1 |
|
113 | avg chain length : 17 | |
110 | max chain length : 45 |
|
114 | max chain length : 45 | |
111 |
max chain reach : 2 |
|
115 | max chain reach : 27506743 | |
112 |
compression ratio : 2 |
|
116 | compression ratio : 27 | |
113 |
|
117 | |||
114 | uncompressed data size (min/max/avg) : 346468 / 346472 / 346471 |
|
118 | uncompressed data size (min/max/avg) : 346468 / 346472 / 346471 | |
115 |
full revision size (min/max/avg) : 2010 |
|
119 | full revision size (min/max/avg) : 201007 / 201077 / 201051 | |
116 |
inter-snapshot size (min/max/avg) : 1 |
|
120 | inter-snapshot size (min/max/avg) : 13223 / 172097 / 56809 | |
117 |
level-1 (min/max/avg) : 1 |
|
121 | level-1 (min/max/avg) : 13223 / 172097 / 101765 | |
118 |
level-2 (min/max/avg) : |
|
122 | level-2 (min/max/avg) : 28558 / 85237 / 51050 | |
119 |
|
|
123 | level-3 (min/max/avg) : 14647 / 41752 / 31093 | |
|
124 | level-4 (min/max/avg) : 18596 / 20760 / 19635 | |||
|
125 | delta size (min/max/avg) : 10649 / 104791 / 11005 | |||
120 |
|
126 | |||
121 |
deltas against prev : 4 |
|
127 | deltas against prev : 4171 (86.50%) | |
122 |
where prev = p1 : 41 |
|
128 | where prev = p1 : 4127 (98.95%) | |
123 | where prev = p2 : 0 ( 0.00%) |
|
129 | where prev = p2 : 0 ( 0.00%) | |
124 |
other : 4 |
|
130 | other : 44 ( 1.05%) | |
125 |
deltas against p1 : 6 |
|
131 | deltas against p1 : 633 (13.13%) | |
126 |
deltas against p2 : 1 |
|
132 | deltas against p2 : 18 ( 0.37%) | |
127 | deltas against other : 0 ( 0.00%) |
|
133 | deltas against other : 0 ( 0.00%) |
General Comments 0
You need to be logged in to leave comments.
Login now