D6709: config: add --registered flag to show all known configs

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Sun Sep 15 09:33:27 EDT 2019


mharbison72 added a comment.


  In D6709#100618 <https://phab.mercurial-scm.org/D6709#100618>, @marmoute wrote:
  
  > In D6709#99199 <https://phab.mercurial-scm.org/D6709#99199>, @av6 wrote:
  >
  >> I'm strongly -1 on adding qualifiers straight to the keys. The primary usage scenario here is scripts (as explained in issue6014) -- regular users lived without this feature for years and didn't care (enough to file a bug) about getting all config options, or their default values, //or// the experimental status (they could and still can read it in hg help config). `--registered` is needed for things like shell completions, and the output needs to be clear and parseable (and consistent with what regular showconfig shows).
  >
  > I disagree that the primary use is script only. As a suer I have wanted this for a long time and I am happy to finally have a way to get this data without grepping the source.
  >
  >> Even adding "(default: x)" to values already complicates the parsing process to get multiple config options in a script. Yeah, a script can get individual values one by one, but it can take ages because of the start-up time (again, this is important for interactive scripts like shell completions).
  >
  > May we should drop the `(default: x)` part unless --verbose is specified. That would make sense to me. Since experimental/devel/debug(/deprecated?) only appears with --verbose that might work just fine for you ?
  
  Alternatively, what if we just dropped the `(default: x)`, `(EXPERIMENTAL)`, and whatever else complicates parsing if HGPLAIN is set?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6709/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6709

To: navaneeth.suresh, #hg-reviewers, av6, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list