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