You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, if you use -r or include a path argument with log, your configured revsets.log entry is completely ignored, and you must ensure that your use of -r is a complete description of the revset you'd like to see.
This makes sense, because -rshould be unambiguous (...though it currently isn't; see my comment here). But if someone has taken the trouble to configure revsets.log, especially if it's a complex expression, it would be helpful to be able to use variations of that default revset without needing to rewrite it as part of each command's revset expression.
Describe the solution you'd like
There should be a new function in the revset language, named something like default() or configured(), that expands to the configured revsets.log.
One advantage of configured() over default() is that default() could instead expand to the pre-configuration default, i.e. '@ | ancestors(immutable_heads().., 2) | trunk()'.
Describe alternatives you've considered
The actual config entry path could be used: revsets.log(). That feels a little weird to me, since presumably we wouldn't want arbitrary config paths to be part of the revset language. However, maybe that would make sense if the revsets block is expanded to include entries other than log and short-prefixes.
One alternative that I think would be strictly worse would be a separate flag that would have the same behavior as adding & <expr> to the revset, where <expr> is the configured revset expression.
Additional context
See links above.
The text was updated successfully, but these errors were encountered:
It could be some namespaced aliases (e.g. revsets.log = {'default()': .., 'work()': ..}), but I'm not sure. (I just thought the single default() might not be enough if we expand this rule to -T/--template arguments.)
Is your feature request related to a problem? Please describe.
Currently, if you use
-r
or include a path argument withlog
, your configuredrevsets.log
entry is completely ignored, and you must ensure that your use of-r
is a complete description of the revset you'd like to see.This makes sense, because
-r
should be unambiguous (...though it currently isn't; see my comment here). But if someone has taken the trouble to configurerevsets.log
, especially if it's a complex expression, it would be helpful to be able to use variations of that default revset without needing to rewrite it as part of each command's revset expression.Describe the solution you'd like
There should be a new function in the revset language, named something like
default()
orconfigured()
, that expands to the configuredrevsets.log
.One advantage of
configured()
overdefault()
is thatdefault()
could instead expand to the pre-configuration default, i.e.'@ | ancestors(immutable_heads().., 2) | trunk()'
.Describe alternatives you've considered
The actual config entry path could be used:
revsets.log()
. That feels a little weird to me, since presumably we wouldn't want arbitrary config paths to be part of the revset language. However, maybe that would make sense if therevsets
block is expanded to include entries other thanlog
andshort-prefixes
.One alternative that I think would be strictly worse would be a separate flag that would have the same behavior as adding
& <expr>
to the revset, where<expr>
is the configured revset expression.Additional context
See links above.
The text was updated successfully, but these errors were encountered: