patch: introduce changedfiles
returns the set of all changed files in a given patch
debugindex: change output for generaldelta revlogs
For generaldelta revlogs, reporting the deltaparent instead of the chain base
makes more sense, since that's what's actually stored in the revlog.
revlog: support reading generaldelta revlogs
Generaldelta is a new revlog global flag. When it's turned on, the base field
of each revision entry holds the deltaparent instead of the base revision of
the current delta chain.
This allows for great potential flexibility when generating deltas, as any
revision can serve as deltaparent. Previously, the deltaparent for revision r
was hardcoded to be r - 1.
The base revision of the delta chain can still be accessed as before, since it
is now computed in an iterative fashion, following the deltaparents backwards.
revlog: calculate base revisions iteratively
This is in preparation for generaldelta, where the revlog entry base field is
reinterpreted as the deltaparent. For that reason we also rename the base
function to chainbase.
Without generaldelta, performance is unaffected, but generaldelta will suffer
from this in _addrevision, since delta chains will be walked repeatedly.
A cache has been added to eliminate this problem completely.
revlog: remove the last bits of punched/shallow
Most of it was removed in
e7483ec3c374, but a few pieces were accidentally
left behind.
util: make readfile() operate in binary mode
writefile() and appendfile() are already working that way.
cmdutil: normalize log message eols when reading from file
This will be necessary once util.readfile() operates in binary mode. While
changelog.add() already normalizes the message, doing so in logmessage() is
required as ui.edit() or others expect messages with LF only.