D5800: config: introduce a new value for ui.relative-paths getting old behavior

yuja (Yuya Nishihara) phabricator at mercurial-scm.org
Sun Feb 3 17:49:58 EST 2019


yuja added a comment.


  >   > Looks good, but I find it isn't easy to parse the meaning of
  >   >  `getuipathfn(repo, forcevalue=True)`. Perhaps it can be spelled as
  >   >  `forcerelative=True`.
  >   
  >   The problem is that this an override value for a boolean value, so it's easy to mistake `forcerelative=False` to mean "don't force it to be relative". That's why I went for `forcevalue` (meaning "force to this value"). I agree that it can still easily be read as "force a value". Perhaps `forceto` works better, although it's a bit unconventional? I'll change it to that and you can tell me if it seems worse.
  
  What I thought confusing is `scmutil.getuipathfn(ctx.repo(), legacyvalue=True)`
  in https://phab.mercurial-scm.org/D5801. "What does the `True` mean? relative, absolute, or a complete
  different stuff?"
  
  I still think somehow including "relative" in the variable name is better than
  "forceto" or "forcevalue".

REPOSITORY
  rHG Mercurial

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

To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list