templater: do not pre-evaluate generator keyword at runsymbol (
issue4868)
It was introduced by
e06e9fd2d99f, but the important code was removed by
a3c2d9211294. So there was no positive effect other than exhausting memory.
The problem spotted by
e06e9fd2d99f is that you can't use a generator keyword
more than once. For example, in hgweb template, "{child} {child}" doesn't work
because the first "{child}" consumes the generator. But as
a3c2d9211294 says,
the fix was wrong because it could overwrite a callable keyword that returns
a generator. Also the fix didn't work for a generator of generator such as
"{diff}" keyword. So, the proper fix for that problem would be to not put
a generator in a keyword table. Instead, it should be a factory of a generator.
Note that this should fix the memory issue in hgweb, but my firefox killed by
OOM in place. Be careful to not use a modern web browser to test the
issue4868.
merge: drop special parent assignment in the obsolete case
We can safely drop this because the very same assignment is enforcement later in
the function. Dropping it will make it simpler to extract the default
destination logic in its own function.
bundle: use bundle2 if repository uses general delta
As bundle1 does not support generaldelta, this would mean recomputing delta at
bundle time. This is similar to what we do for strip and shelve and was tracked
as
issue4865.
bundle: extend the format of --type to support version and compression
We had some basic undocumented support for uncompressed bundle2 support. We now
have an official extensible syntax to specify both format type and compression
(eg: bzip2-v2).
In practice, this changeset introduce the 'v1' and 'v2' identifier to make it
possible to combine format and compression. The default format is still 'v1'.
We'll care about picking 'v1' or 'v2' in regard with general delta in the next
changesets.
hgweb: fix border-radius for standards-based browsers
While here, remove an old gecko-specific property, as gecko has
supported the unprefixed version for many years.
filemerge: move precheck to before files are written out
This is much simpler, and also avoids unnecessary disk IO.
filemerge: move 'merging' output to before file creation
This has no visible impact but makes some future work simpler.
filemerge.filemerge: make a tuple containing merge paths on disk
We're going to need this same tuple elsewhere.
filemerge: switch trymerge boolean to mergetype enum
trymerge = False becomes mergetype = nomerge, and trymerge = True becomes
mergetype = fullmerge or mergeonly, depending on whether a premerge happens.