revert: make revert --interactive use git style diff
This allows us to use existing code to detect files that are newly added and
modified. In turn, this allows us to make revert --interactive support
editing newly added and modified files.
record: extract code to compute newly added and modified files
We want to reuse this logic in revert.
record: extract ishunk to a function
We extract this code as we want to reuse it in revert -i.
parser: extract closure of prettyformat() to a top-level function
There was no capture until I added 'leafnodes' argument.
parser: move prettyformat() function from revset module
I want to use it in doctests that I'll add by future patches. Also, it can
be used in "hg debugfileset" command.
fileset: move validation of incomplete parsing to parse() function
fileset.parse() should be responsible for all parsing errors as well.
revset: move validation of incomplete parsing to parse() function
revset.parse() should be responsible for all parsing errors. Perhaps it wasn't
because 'revset.parse' was not a real function when the validation code was
added at
ffcb7e4d719f.
match: fix bug in match.visitdir()
There was a bug in my recent change to visitdir (
8545bd381504) due to
the stored generator being iterated over twice. Making the generator into a
list at the start fixes this.
error: derive RevlogError from HintException instead of Exception
This will allow us to now pass hints into this exception.