durin42 requested changes to this revision.
durin42 added a comment.
This revision now requires changes to proceed.


  In https://phab.mercurial-scm.org/D219#3755, @martinvonz wrote:
  
  > In https://phab.mercurial-scm.org/D219#3661, @quark wrote:
  >
  > > I'm thinking about the difference between the deprecated `[defaults]` and 
`[commands]` (and also `[alias]`) but don't quite get it. It seems people 
wanting the behavior might just set `alias.status = status -v`, or use 
`[defaults]`. What's the advantage of using a `[commands]` option?
  >
  >
  > Good point, there's probably no good reason to use [commands] for this. 
[defaults] has been discouraged, but I don't know if there's a good reason to 
discourage it (I think it's already ignored when HGPLAIN is in effect).
  
  
  The discouragement is twofold: we didn't used to have HGPLAIN, and it used to 
be there was no way to un-do the setting of a boolean flag in [defaults]. Both 
of those limitations are now fixed, so I'm less worried about it overall. That 
said, I would like a config knob for this, so it can be part of 
ui.tweakdefaults.
  
  > [commands] make sense when there's no command line flag for the behavior, 
but we do have that here. So if we agree on using --verbose for this, I don't 
think I see a reason to a special config for it and we can use [defaults] 
instead.
  > 
  > Hmm, I just realized there is a somewhat good reason to avoid [defaults]: 
it applies to *all* options at once. Let me clarify with an example. Let's say 
your sysadmin has set "defaults.status = --relative" (hypothetical option -- 
it's currently a config in [commands]) and you want to keep that *and* get 
verbose status output, you now have to copy the default config from the system 
hgrc. I don't think I've heard that argument against [defaults] before, but 
that seems more relevant than the scripting argument (which, again, goes away 
with HGPLAIN). Or am I mistaken?
  
  That's another argument in favor of a config knob IMO.
  
  I'm not sure if --verbose should be (ab)used for this, given that we've got 
--terse. --verbose almost sounds like the opposite of --terse, so it might be 
confusing. Meditate on that, I guess.
  
  (Marking as "Request changes" for now, since we seem largely agreed that 
--verbose is a decent way to go, and if nobody else is worried about the 
conceptual overlap with --terse I'm fine with it, especially since I more or 
less expect this to be on in tweakdefaults soon.)

REPOSITORY
  rHG Mercurial

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

To: pulkit, #hg-reviewers, durin42
Cc: durin42, quark, akushner, martinvonz, durham, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to