repair: define explicit local variable, don't reuse a comprehension variable
The node ID used in strip bundle names is currently taken as the last
iterated value in a list comprehension found much earlier in the function.
This change makes the node selection more explicit at the cost of redundancy.
commands.paths: use ui.paths to show paths
We now have an API for representing a collection of paths. Use it.
ui: represent paths as classes
Many have long wanted for paths to have expanded functionality and
flexibility.
In order to make that transition possible, we need to start
representing paths as something more than simple strings.
This patch introduces two classes:
1) "path" for representing a single path instance
2) "paths" for representing a collection of "paths"
Since we don't like patches that introduce new code without any
consumers, we convert ui.expandpath() to use the new APIs internally.
Upcoming patches will start exposing "path" instances to consumers
that currently interface with string paths.
The new "paths" attribute of ui is populated from config data the first
time it is accessed. Since it isn't updated when the configs are
modified, this could lead to some inaccurate caching behavior. It
shouldn't be an issue, as paths information is typically not accessed
until command dispatch, which occurs after the repository config
and extensions have been loaded. Time will tell if we need to refresh
paths information when the underlying config changes.
color: omit terminfo/win32 warning if non-interactive (
issue4543)
It's pretty annoying to be getting this warning when already the
colour extension has no hope of working. If there isn't a human on the
other end to to see the colours, there probably isn't a human either
who cares about this warning. More likely, some script somewhere is
gonna get confused with the warning output.
Of course, if we still want to see the warning for some reason, we can
always set --config ui.interactive=True.
incoming: hide help about use of --bundle option by default
Pulling from incoming bundle can cause trouble such as missing phase movement,
bookmarks and largefiles transfer. Average user won't need this option.
patch.applydiff: accept a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.
patch._applydiff: accept a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.
We normalize the prefix here because this is the main driver -- all code to
apply patches is expected to go through here.
patch.makepatchmeta: accept a prefix parameter
This is preparation for upcoming patches that will add support for applying a
patch within a subdirectory.