Thu, 15 Mar 2018 11:19:16 -0700 httppeer: consolidate _requestbuilder assignments and document
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 15 Mar 2018 11:19:16 -0700] rev 36961
httppeer: consolidate _requestbuilder assignments and document I collapsed multiple assignments because they don't appear to be necessary. We don't invoke the requestbuilder in anything called during __init__. So there's no reason to not define it earlier AFAICT. This seemingly useless attribute is actually an extension point. Document it as such. (A previous version of this patch removed the attribute because it appeared to just be an alias.) Differential Revision: https://phab.mercurial-scm.org/D2723
Mon, 05 Mar 2018 00:18:07 -0500 commands: don't check for merge.update() truthiness
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 05 Mar 2018 00:18:07 -0500] rev 36960
commands: don't check for merge.update() truthiness AFAICT ``stats`` is always a tuple in these cases. We don't need to check if the variable has a truthy value. Differential Revision: https://phab.mercurial-scm.org/D2691
Wed, 07 Mar 2018 19:57:50 -0800 httppeer: alias url as urlmod
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 07 Mar 2018 19:57:50 -0800] rev 36959
httppeer: alias url as urlmod "url" is a common variable name. We do this aliasing elsewhere to avoid shadowing. Differential Revision: https://phab.mercurial-scm.org/D2724
Wed, 14 Mar 2018 11:52:35 -0700 util: prefer "bytesio" to "stringio"
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 14 Mar 2018 11:52:35 -0700] rev 36958
util: prefer "bytesio" to "stringio" The io.BytesIO and io.StringIO types enforce the type of data being operated on. On Python 2, we use cStringIO.StringIO(), which is lax about mixing types. On Python 3, we actually use io.BytesIO. Ideally, we'd use io.BytesIO on Python 2. But I believe its performance is poor compared to cString.StringIO(). Anyway, we canonically define our pycompat type as "stringio." That name is misleading, especially on Python 3. This commit renames the canonical symbols to "bytesio." "stringio" is preserved as an alias for API compatibility. There are a lot of callers in the repo and I hesitate to take away the old name. I also don't feel like changing everything at this time. But at least new callers can use a "proper" name. Differential Revision: https://phab.mercurial-scm.org/D2868
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -4 +4 +10 +30 +100 +300 +1000 +3000 +10000 tip