##// END OF EJS Templates
exchange: check the `ui.clonebundleprefers` form while processing (issue6257)...
Matt Harbison -
r44763:87780592 default
parent child Browse files
Show More
@@ -3068,7 +3068,15 b' def sortclonebundleentries(ui, entries):'
3068 if not prefers:
3068 if not prefers:
3069 return list(entries)
3069 return list(entries)
3070
3070
3071 prefers = [p.split(b'=', 1) for p in prefers]
3071 def _split(p):
3072 if b'=' not in p:
3073 hint = _(b"each comma separated item should be key=value pairs")
3074 raise error.Abort(
3075 _(b"invalid ui.clonebundleprefers item: %s") % p, hint=hint
3076 )
3077 return p.split(b'=', 1)
3078
3079 prefers = [_split(p) for p in prefers]
3072
3080
3073 items = sorted(clonebundleentry(v, prefers) for v in entries)
3081 items = sorted(clonebundleentry(v, prefers) for v in entries)
3074 return [i.value for i in items]
3082 return [i.value for i in items]
@@ -455,6 +455,19 b' Test where attribute is missing from som'
455 no changes found
455 no changes found
456 2 local changesets published
456 2 local changesets published
457
457
458 Test a bad attribute list
459
460 $ hg --config ui.clonebundleprefers=bad clone -U http://localhost:$HGPORT bad-input
461 abort: invalid ui.clonebundleprefers item: bad
462 (each comma separated item should be key=value pairs)
463 [255]
464 $ hg --config ui.clonebundleprefers=key=val,bad,key2=val2 clone \
465 > -U http://localhost:$HGPORT bad-input
466 abort: invalid ui.clonebundleprefers item: bad
467 (each comma separated item should be key=value pairs)
468 [255]
469
470
458 Test interaction between clone bundles and --stream
471 Test interaction between clone bundles and --stream
459
472
460 A manifest with just a gzip bundle
473 A manifest with just a gzip bundle
General Comments 0
You need to be logged in to leave comments. Login now