localrepo: eliminate requirements class variable (API)
Localrepo's requirements class variable was introduced in
b090601a80d1 to make
requirements modifiable by extensions. A main access point, _baserequirements,
still exists, but this change undoes making the class variable to begin with.
Without this simplification, there is a class variable with a default value
that is only copied, but never directly used. This behavior is moved directly
into the _baserequirements function.
changegroup.group: drop 'reorder' parameter
Since we always pass self._reorder to self.group(), let's drop the
parameter and let group() read from self._reorder itself. There are no
other in-tree callers to group().
cg2packer: set reorder=False in __init__ instead of in group()
The difference between reorder=None (bundle.reorder=auto) and
reorder=False is that the generaldelta revlogs get reordered with the
former. In cg2packer, group() we check if the revlog uses generaldelta
and if reorder=None and then convert that to reorder=False. We are
effectively saying that whether or not generaldelta is used, we want
reorder=None to mean reorder=False for changegroup 2. To make this
clearer, check if reorder=None in the constructor and change it to
False there and drop the overriding of group(). Also document the
reason for turning reordering off.
changegroup: use 'reorder is None' instead of 'reorder is not True/False'
The config option bundle.reorder can be {on,off,auto}, which gets read
into the 'reorder' variable as {True,False,None}. In two places, we
need to decide how to handle the None/auto case. I personally find it
easier to read those expressions when written to explicitly compare to
None.
windows: add doctest for shellquote()
This is actual test coverage for
issue4629. The test changes in
eea3977e6fca
were simply the addition of quotes to the output, not ensuring that strings with
backslashes are quoted.
template-phases: extend default style instead of duplicating it
The phases style started as a copy of the default style at
5c5152af0d15, but
we didn't have to copy it because the templater supports %include syntax.
This makes sure that the phases style have the same output as the default
except for the additional "phase:" row.