D5800: config: introduce a new value for ui.relative-paths getting old behavior
Yuya Nishihara
yuya at tcha.org
Sun Feb 3 22:48:48 UTC 2019
> > 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 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".
More information about the Mercurial-devel
mailing list