This is an archive of the discontinued Mercurial Phabricator instance.

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

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

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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).

tests/test-clonebundles.t
458–464

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.
tests/test-clonebundles.t
458–464

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
tests/test-clonebundles.t
458–464

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)
[255]
mharbison72 updated this revision to Diff 19984.Feb 7 2020, 9:59 AM
marmoute accepted this revision.Feb 7 2020, 10:01 AM

Thanks

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