Page MenuHomePhabricator

exchange: check the `ui.clonebundleprefers` form while processing (issue6257)

Authored by mharbison72 on Jan 22 2020, 12:14 PM.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Jan 22 2020, 12:14 PM
marmoute requested changes to this revision.Feb 5 2020, 6:25 PM
marmoute added a subscriber: marmoute.

(feel free to put it back in review-needed if my question was silly).


Your patch is about testing error when only one of the items is bad. Then, your tests only test it with a single item. Am I missing something or should we have a tests with multiple items in the list ?

This revision now requires changes to proceed.Feb 5 2020, 6:25 PM
mharbison72 requested review of this revision.Feb 5 2020, 9:21 PM
mharbison72 added inline comments.

Not sure I understand. There are a handful of tests in test-clonebundles.t that have multiple key/value pairs already, so the good case is covered. (I missed this before and thought that I commented there was no coverage, but I was wrong and don't see that comment now.)

The setting needs to be in ui.clonebundles=key=value[,key=value] form. So if it catches a single malformed key/value pair, I'm not sure that it buys us anything to have a good,bad test too, unless I'm missing something.

marmoute added inline comments.Feb 6 2020, 4:05 AM

a test mixing good and bad would check that we report error on the appropriate blocks.

something like:

$ hg --config ui.clonebundleprefers=extra=b,bad,COMPRESSION=unknown clone -U http://localhost:$HGPORT bad-input

abort: invalid ui.clonebundleprefers item: bad
(each comma separated item should be key=value pairs)
mharbison72 updated this revision to Diff 19984.Feb 7 2020, 9:59 AM
marmoute accepted this revision.Feb 7 2020, 10:01 AM


pulkit accepted this revision.Feb 7 2020, 3:25 PM
This revision is now accepted and ready to land.Feb 7 2020, 3:25 PM