D2776: hgweb: use a multidict for holding query string parameters

2018-03-15 Thread indygreg (Gregory Szorc)
indygreg added a comment. I may have a shot at rewriting this class today. I do want to prioritize on adding missing components to the new wire protocol so reviewers have better context, however. So if someone else wants to do the work, I'd happily review it. Otherwise, I should get around

D2776: hgweb: use a multidict for holding query string parameters

2018-03-15 Thread yuja (Yuya Nishihara)
yuja added inline comments. INLINE COMMENTS > indygreg wrote in request.py:31 > I agree with the sentiment about this being a list in disguise. One reason I > didn't bother to optimize it is because I don't think we do any `qsparams` > lookups in loops and I don't believe we have any more than

D2776: hgweb: use a multidict for holding query string parameters

2018-03-14 Thread indygreg (Gregory Szorc)
indygreg added inline comments. INLINE COMMENTS > durin42 wrote in request.py:31 > I'm a little uncomfortable with this not advertising that it's not a hash > table, and htat lookups are O(N). Maybe send a docstring followup? I agree with the sentiment about this being a list in disguise. One

D2776: hgweb: use a multidict for holding query string parameters

2018-03-14 Thread av6 (Anton Shestakov)
av6 added inline comments. INLINE COMMENTS > martinvonz wrote in request.py:45 > Would it make sense to make this an error if there isn't exactly one value? I don't think it would. AIUI, that would make handling query strings like ?style=foo=bar just more difficult. I'm not aware of any web

D2776: hgweb: use a multidict for holding query string parameters

2018-03-13 Thread martinvonz (Martin von Zweigbergk)
martinvonz added inline comments. INLINE COMMENTS > request.py:39-41 > +# Stores (key, value) 2-tuples. This isn't the most efficient. But we > +# don't rely on parameters that much, so it shouldn't be a perf > issue. > +# we can always add dict for fast lookups. Sure,

D2776: hgweb: use a multidict for holding query string parameters

2018-03-12 Thread durin42 (Augie Fackler)
durin42 added inline comments. INLINE COMMENTS > request.py:31 > > +class multidict(object): > +"""A dict like object that can store multiple values for a key. I'm a little uncomfortable with this not advertising that it's not a hash table, and htat lookups are O(N). Maybe send a

D2776: hgweb: use a multidict for holding query string parameters

2018-03-10 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 6840. indygreg edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2776?vs=6838=6840 REVISION DETAIL https://phab.mercurial-scm.org/D2776 AFFECTED FILES mercurial/hgweb/request.py

D2776: hgweb: use a multidict for holding query string parameters

2018-03-10 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 6838. indygreg edited the summary of this revision. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2776?vs=6822=6838 REVISION DETAIL https://phab.mercurial-scm.org/D2776 AFFECTED FILES mercurial/hgweb/request.py

D2776: hgweb: use a multidict for holding query string parameters

2018-03-09 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY My intention with refactoring the WSGI code was to make it easier to read. I initially wanted to vendor and use WebOb, because it seems to be a pretty