tests: drop some py2 specific pyflake failures
Differential Revision: https://phab.mercurial-scm.org/D12422
util: drop a duplicate import
This was already imported several lines above.
Differential Revision: https://phab.mercurial-scm.org/D12421
pycompat: drop the pickle import
I suspect this is what
df56e6bd37f6 meant to eliminate.
Differential Revision: https://phab.mercurial-scm.org/D12420
util: restore the util.pickle symbol
This was accidently dropped in
df56e6bd37f6, which started importing pickle
directly. That commit explicitly says it will retain it for compatibility with
external stuff though.
The unused import in pycompat isn't flagged because that module is skipped.
Just importing with a comment seemed cleaner than `import X as Y` and then
assigning to a `pickle` variable, just to avoid the pyflakes warning.
Differential Revision: https://phab.mercurial-scm.org/D12419
precheck: fix false warning about content-divergence creation
Before this patch, if we try to `hg prune` (without any successors) an
already obsoleted cset which has at least one successor, it would false
warn about new content-divergence. As we know, pruning cset without any
successors can not create any divergence.
Differential Revision: https://phab.mercurial-scm.org/D12002
streamclone: avoid some obscure error in a corner case
I don't really know how, but I ran into this error:
$ hg clone --stream ssh://user@dummy/empty-repo local-empty-repo
streaming all changes
abort: unable to apply stream clone: unsupported format:
[255]
I think you need an empty list of requirements for this to happen,
which is weird, but an obscure error like this is not exactly helpful
either. Since this is the result of an encoding bug anyway, just fix
it.
Differential Revision: https://phab.mercurial-scm.org/D12402