merge: cut import cycle at merge -> extensions
This seems less bad because checking fsmonitor looks like a temporary hack,
and cmdutil -> mergemod should be a valid dependency.
subrepo: split non-core functions to new module
Resolves import cycle caused by subrepo -> cmdutil. Still we have another
cycle, cmdutil -> context -> subrepo, but where I think importing context
is wrong. Perhaps we'll need repo.makememctx().
diff: remove fp.write() wrapper which drops label argument
It's no longer needed since we've split labeled write() from file-like
write().
log: pack filematcher and hunksfilter into changesetdiffer object
This is just a way of getting rid of clumsy makefilematcher/makehunksfilter
arguments. There might be a better abstraction, but I don't think this is bad.
This makes filematcher and hunksfilter available by default, but that should
be fine.
log: drop dead code to concatenate --line-range patterns and pats
It's disabled since
2e45bbd3db7b, and the current implementation is unlikely
to be reused.
logcmdutil: create hunksfilter and filematcher even if no diff option given
It's okay since
5fe6f946f111, "log: allow matchfn to be non-null even if both
--patch/--stat are off."
logcmdutil: unindent diff generator of changesetprinter
Prepares for the next few patches which will make matchfn and hunksfilterfn
always available.
logcmdutil: hold makefilematcher/makehunksfilter() by changesetpriner (API)
This merges self.matchfn and self.show(matchfn) into self._makefilematcher,
and does the same for hunksfilter. Because changesetprinter seems to have
too many optional arguments, makefilematcher() and makehunksfilter() will
be packed into one object by later patch.
log: pass ctx to makefilematcher() and makehunksfilter() functions
This isn't important, but seems more consistent as changesetprinter.show()
takes a ctx, not a revision number.
tests: allow age to go up to triple digits in test-shelve.t
We started to glob the age of shelved changes in
51934fc796c0, which says that
sometimes tests run slow and `hg shelve --list` says "2s" instead of "1s".
However in some instances, like [1], tests run so slow that the age goes up to
double digits ("13s" in that case). When that happens, `hg shelve --list`
output has less white spaces after the age, so let's glob the spaces too. We
probably won't ever need to handle triple digits there, but I went ahead and
left only 2 required white spaces in total.
[1]: https://buildd.debian.org/status/fetch.php?pkg=mercurial&arch=sparc64&ver=4.5-1&stamp=
1518360804&raw=0