Show More
@@ -118,14 +118,19 b' def compare(' | |||
|
118 | 118 | local_case, |
|
119 | 119 | remote_case, |
|
120 | 120 | display_header=True, |
|
121 | display_case=True, | |
|
121 | 122 | ): |
|
122 | 123 | case = (repo, local_case, remote_case) |
|
123 | 124 | if display_header: |
|
124 | print( | |
|
125 | "#", | |
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
125 | pieces = ['#'] | |
|
126 | if display_case: | |
|
127 | pieces += [ | |
|
128 | "repo", | |
|
129 | "local-subset", | |
|
130 | "remote-subset", | |
|
131 | ] | |
|
132 | ||
|
133 | pieces += [ | |
|
129 | 134 | "discovery-variant", |
|
130 | 135 | "roundtrips", |
|
131 | 136 | "queries", |
@@ -135,7 +140,8 b' def compare(' | |||
|
135 | 140 | "undecided-initial", |
|
136 | 141 | "undecided-common", |
|
137 | 142 | "undecided-missing", |
|
138 |
|
|
|
143 | ] | |
|
144 | print(*pieces) | |
|
139 | 145 | for variant in VARIANTS_KEYS: |
|
140 | 146 | res = process(case, VARIANTS[variant]) |
|
141 | 147 | revs = res["nb-revs"] |
@@ -143,36 +149,31 b' def compare(' | |||
|
143 | 149 | common_heads = res["nb-common-heads"] |
|
144 | 150 | roundtrips = res["total-roundtrips"] |
|
145 | 151 | queries = res["total-queries"] |
|
146 | if 'tree-discovery' in variant: | |
|
147 | print( | |
|
152 | pieces = [] | |
|
153 | if display_case: | |
|
154 | pieces += [ | |
|
148 | 155 | repo, |
|
149 | 156 | format_case(local_case), |
|
150 | 157 | format_case(remote_case), |
|
151 |
|
|
|
152 | roundtrips, | |
|
153 |
|
|
|
154 |
|
|
|
155 |
|
|
|
156 |
|
|
|
157 |
|
|
|
158 | else: | |
|
158 | ] | |
|
159 | pieces += [ | |
|
160 | variant, | |
|
161 | roundtrips, | |
|
162 | queries, | |
|
163 | revs, | |
|
164 | local_heads, | |
|
165 | common_heads, | |
|
166 | ] | |
|
167 | if 'tree-discovery' not in variant: | |
|
159 | 168 | undecided_common = res["nb-ini_und-common"] |
|
160 | 169 | undecided_missing = res["nb-ini_und-missing"] |
|
161 | 170 | undecided = undecided_common + undecided_missing |
|
162 |
p |
|
|
163 | repo, | |
|
164 | format_case(local_case), | |
|
165 | format_case(remote_case), | |
|
166 | variant, | |
|
167 | roundtrips, | |
|
168 | queries, | |
|
169 | revs, | |
|
170 | local_heads, | |
|
171 | common_heads, | |
|
171 | pieces += [ | |
|
172 | 172 | undecided, |
|
173 | 173 | undecided_common, |
|
174 | 174 | undecided_missing, |
|
175 |
|
|
|
175 | ] | |
|
176 | print(*pieces) | |
|
176 | 177 | return 0 |
|
177 | 178 | |
|
178 | 179 | |
@@ -200,6 +201,9 b" if __name__ == '__main__':" | |||
|
200 | 201 | if '--no-header' in argv: |
|
201 | 202 | kwargs['display_header'] = False |
|
202 | 203 | argv = [a for a in argv if a != '--no-header'] |
|
204 | if '--no-case' in argv: | |
|
205 | kwargs['display_case'] = False | |
|
206 | argv = [a for a in argv if a != '--no-case'] | |
|
203 | 207 | |
|
204 | 208 | if len(argv) != 4: |
|
205 | 209 | usage = f'USAGE: {script_name} REPO LOCAL_CASE REMOTE_CASE' |
General Comments 0
You need to be logged in to leave comments.
Login now