Mercurial > hg
view CONTRIBUTORS @ 45883:1817b66897ad
errors: create "similarity hint" for UnknownIdentifier eagerly in constructor
No code wanted to do anything but to produce a hint from it anyway, so
we might as well just store the hint in the exception (which already
extended `Hint`). That way we can easily convert it to a
`ConfigException` when it's parsing of configuration that fails.
I was wondering if the purpose of lazily creating the string was so we
don't create it in cases where it won't get printed anyway. However, I
couldn't find any places where that could happen. If we do find such
places, we could instead revert to making it lazy but add a function
on `UnknownIdentifier` for creating the hint string.
I dropped the comment saying "make sure to check fileset first, as
revset can invoke fileset", which was added in 4e240d6ab898 (dispatch:
offer near-edit-distance suggestions for {file,rev}set functions,
2015-01-26). I couldn't figure out what it meant. The author of that
patch also did not remember the reason for it. Perhaps changes that
have happened since then made it so it no longer matters.
Differential Revision: https://phab.mercurial-scm.org/D9346
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 19 Nov 2020 11:23:59 -0800 |
parents | c29efd272395 |
children |
line wrap: on
line source
[This file is here for historical purposes, all recent contributors should appear in the changelog directly] Andrea Arcangeli <andrea at suse.de> Thomas Arendsen Hein <thomas at intevation.de> Goffredo Baroncelli <kreijack at libero.it> Muli Ben-Yehuda <mulix at mulix.org> Mikael Berthe <mikael at lilotux.net> Benoit Boissinot <bboissin at gmail.com> Brendan Cully <brendan at kublai.com> Vincent Danjean <vdanjean.ml at free.fr> Jake Edge <jake at edge2.net> Michael Fetterman <michael.fetterman at intel.com> Edouard Gomez <ed.gomez at free.fr> Eric Hopper <hopper at omnifarious.org> Alecs King <alecsk at gmail.com> Volker Kleinfeld <Volker.Kleinfeld at gmx.de> Vadim Lebedev <vadim at mbdsys.com> Christopher Li <hg at chrisli.org> Chris Mason <mason at suse.com> Colin McMillen <mcmillen at cs.cmu.edu> Wojciech Milkowski <wmilkowski at interia.pl> Chad Netzer <chad.netzer at gmail.com> Bryan O'Sullivan <bos at serpentine.com> Vicent SeguĂ Pascual <vseguip at gmail.com> Sean Perry <shaleh at speakeasy.net> Nguyen Anh Quynh <aquynh at gmail.com> Ollivier Robert <roberto at keltia.freenix.fr> Alexander Schremmer <alex at alexanderweb.de> Arun Sharma <arun at sharma-home.net> Josef "Jeff" Sipek <jeffpc at optonline.net> Kevin Smith <yarcs at qualitycode.com> TK Soh <teekaysoh at yahoo.com> Radoslaw Szkodzinski <astralstorm at gorzow.mm.pl> Samuel Tardieu <sam at rfc1149.net> K Thananchayan <thananck at yahoo.com> Andrew Thompson <andrewkt at aktzero.com> Michael S. Tsirkin <mst at mellanox.co.il> Rafael Villar Burke <pachi at mmn-arquitectos.com> Tristan Wibberley <tristan at wibberley.org> Mark Williamson <mark.williamson at cl.cam.ac.uk>