Durham Goode <durham@fb.com> [Wed, 17 Aug 2016 13:25:13 -0700] rev 29823
manifest: break mancache into two caches
The old manifest cache cached both the inmemory representation and the raw text.
As part of the manifest refactor we want to separate the storage format from the
in memory representation, so let's split this cache into two caches.
This will let other manifest implementations participate in the in memory cache,
while allowing the revlog based implementations to still depend on the full text
caching where necessary.
Augie Fackler <augie@google.com> [Thu, 18 Aug 2016 11:32:02 -0400] rev 29822
dispatch: explicitly pass fancyopts optional arg as a keyword
I've been baffled by this a couple of times (mainly wondering if any
callers of fancyopts.fancyopts that don't use gnu=True exist), so
let's just specify this as a keyword argument to preserve sanity.
Maciej Fijalkowski <fijall@gmail.com> [Sat, 20 Aug 2016 23:05:18 +0200] rev 29821
osutil: fix the bug on OS X when we return more in listdir
The pointer arithmetic somehow got ommitted during the recent change to use
a struct.
Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> [Sun, 21 Aug 2016 08:03:22 +0000] rev 29820
histedit: use samefile function from cmdutil
Replace usage of inefficient samefile function in collapse with a call to
cmdutil.samefile().
Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> [Sun, 21 Aug 2016 08:00:18 +0000] rev 29819
cmdutil: extract samefile function from amend()
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Apr 2016 21:32:30 +0900] rev 29818
templater: rename "right" argument of pad() function
Before, right=True meant right justify, which I think is left padding.
Yuya Nishihara <yuya@tcha.org> [Fri, 22 Apr 2016 21:29:13 +0900] rev 29817
templater: make pad() evaluate boolean argument (BC)
Otherwise it would crash if template expression was passed.
This patch unifies the way how boolean expression is evaluated, which involves
BC. Before "if(true)" and "pad(..., 'false')" were False, which are now True
since they are boolean literal and non-empty string respectively.
"func is runsymbol" is the same hack as evalstringliteral(), which is needed
for label() to take color literals.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 16:29:22 +0900] rev 29816
templater: fix if() to not evaluate False as bool('False')
Before, False was True. This patch fixes the issue by processing True/False
transparently. The other values (including integer 0) are tested as strings
for backward compatibility, which means "if(latesttagdistance)" never be False.
Should we change the behavior of "if(0)" as well?
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 15:55:07 +0900] rev 29815
templater: make it clearer that _flatten() omits None
Gábor Stefanik <gabor.stefanik@nng.com> [Thu, 18 Aug 2016 17:25:10 +0200] rev 29814
revset: support "follow(renamed.py,
e22f4f3f06c3)" (
issue5334)
v2: fixes from review
Matt Mackall <mpm@selenic.com> [Wed, 17 Aug 2016 13:43:13 -0500] rev 29813
coal: use inheritance to derive from paper
This illustrates how much simpler this approach is, in particular the
effect of map-relative paths.
Matt Mackall <mpm@selenic.com> [Wed, 17 Aug 2016 13:40:27 -0500] rev 29812
templater: add inheritance support to style maps
We can now specify a base map file:
__base__ = path/to/map/file
That map file will be read and used to populate unset elements of the
current map. Unlike using %include, elements in the inherited class
will be read relative to that path.
This makes it much easier to make custom local tweaks to a style.
Yuya Nishihara <yuya@tcha.org> [Thu, 18 Aug 2016 18:43:48 +0900] rev 29811
killdaemons: prevent killing all user processes by bad pid file
When I was fixing the test-gpg issue, I noticed gpg-connect-agent could print
"-1" as a server pid if command was wrong. I'm not pretty sure but nobody
would want to kill their running applications by mistake.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Aug 2016 20:56:12 +0900] rev 29810
py3: automatically glob out line numbers from check-py3-compat output
It was boring task to update the result manually.
Yuya Nishihara <yuya@tcha.org> [Wed, 17 Aug 2016 20:52:50 +0900] rev 29809
py3: have check-py3-compat require pygments to get stable result
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 09 Aug 2016 17:06:35 +0200] rev 29808
computeoutgoing: move the function from 'changegroup' to 'exchange'
Now that all users are in exchange, we can safely move the code in the
'exchange' module. This function is really about processing the argument of a
'getbundle' call, so it even makes senses to do so.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 09 Aug 2016 17:00:38 +0200] rev 29807
getchangegroup: take an 'outgoing' object as argument (API)
There is various version of this function that differ mostly by the way they
define the bundled set. The flexibility is now available in the outgoing object
itself so we move the complexity into the caller themself. This will allow use
to remove a good share of the similar function to obtains a changegroup in the
'changegroup.py' module.
An important side effect is that we stop calling 'computeoutgoing' in
'getchangegroup'. This is fine as code that needs such argument processing
is actually going through the 'exchange' module which already all this function
itself.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 09 Aug 2016 22:31:38 +0200] rev 29806
outgoing: add a 'missingroots' argument
This argument can be used instead of 'commonheads' to determine the 'outgoing'
set. We remove the outgoingbetween function as its role can now be handled by
'outgoing' itself.
I've thought of using an external function instead of making the constructor
more complicated. However, there is low hanging fruit to improve the current
code flow by storing some side products of the processing of 'missingroots'. So
in my opinion it make senses to add all this to the class.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 09 Aug 2016 15:55:44 +0200] rev 29805
outgoing: adds some default value for argument
We are about to introduce a third option to create an outgoing object:
'missingroots'. This argument will be mutually exclusive with 'commonheads' so
we implement some default value handling in preparation.
This will also help use to make more use of outgoing creation around the code
base.
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 09 Aug 2016 15:26:53 +0200] rev 29804
outgoing: pass a repo object to the constructor
We are to introduce more code constructing such object in the code base. It will
be more convenient to pass a repository object, all current users already
operate at the repository level anyway. More changes to the contructor argument
are coming in later changeset.
Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> [Tue, 16 Aug 2016 08:21:16 +0000] rev 29803
match: remove matchessubrepo method (API)
Since it is no more used in cmdutil.{files,remove} and scmutil.addremove
we remove this method.
Hannes Oldenburg <hannes.christian.oldenburg@gmail.com> [Tue, 16 Aug 2016 08:15:12 +0000] rev 29802
subrepo: cleanup of subrepo filematcher logic
Previously in the worst case we iterated the files in matcher twice and
had a method only for this, which reimplemented logic in subdirmatchers
constructor. So we replaced the method with a subdirmatcher.files() call.
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Aug 2016 14:46:24 +0900] rev 29801
pycompat: delay loading modules registered to stub
Replacement _pycompatstub designed to be compatible with our demandimporter.
try-except is replaced by version comparison because ImportError will no longer
be raised immediately.
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Aug 2016 12:35:15 +0900] rev 29800
py3: import builtin wrappers automagically by code transformer
This should be less invasive than mucking builtins.
Since tokenize.untokenize() looks start/end positions of tokens, we calculates
them from the NEWLINE token of the future import.
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Aug 2016 12:51:21 +0900] rev 29799
py3: provide (del|get|has|set)attr wrappers that accepts bytes
These functions will be imported automagically by our code transformer.
getattr() and setattr() are widely used in our code. We wouldn't probably
want to rewrite every single call of getattr/setattr. delattr() and hasattr()
aren't that important, but they are functions of the same kind.
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Aug 2016 12:44:13 +0900] rev 29798
py3: check python version to enable builtins hack
Future patches will add (del|get|has|set)attr wrappers.
Yuya Nishihara <yuya@tcha.org> [Sun, 14 Aug 2016 12:41:54 +0900] rev 29797
py3: move xrange alias next to import lines
Builtin functions should be available in compatibility code.
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Aug 2016 17:15:54 +0900] rev 29796
check-code: allow assignment to hasattr variable
Yuya Nishihara <yuya@tcha.org> [Mon, 15 Aug 2016 16:07:55 +0900] rev 29795
debugobsolete: add formatter support (
issue5134)
It appears that computing index isn't cheap if --rev is specified. That's
why "index" field is available only if --index is specified.
I've named marker.flags() as "flag" because "flags" implies a list or dict
in template world.
Thanks to Piotr Listkiewicz for the initial implementation of this patch.
Yuya Nishihara <yuya@tcha.org> [Mon, 15 Aug 2016 12:58:33 +0900] rev 29794
formatter: add function to convert dict to appropriate format
This will be used to process key-value pairs by formatter. The default
field names and format are derived from the {extras} template keyword.
Tests will be added later.