On Mon, Nov 21, 2016 at 5:51 PM, Augie Fackler <r...@durin42.com> wrote:
> > > On Nov 21, 2016, at 19:24, Kyle Lippincott <spect...@pewpew.net> wrote: > > > >> + # No explicit config. Filter out the ones that aren't supposed to > be > >> + # advertised and return default ordering. > >> + if not configengines: > >> + idx = 1 if role == 'server' else 2 > > > > This is hard to read, it would be nice if wireprotosupport() returned a > dict or something, so one could do something like: > wireprotosupport()['roleweight:'+role], > instead of just knowing that it's index 1 or 2. If this is idiomatic and I > just haven't interacted with the code enough to realize it, feel free to > ignore. > > +1 on the dict idea. I like it. > > I'm going to split the difference and use a namedtuple.
_______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel