grep: fixes erroneous output of grep in forward order (
issue3885)
If grep is passed a revset in forwards order via -r , say -r 0:tip
Then the output is erroneous. This patch fixes that. The output was wrong
because we deleted the last revision key in the matches and when we moved
to the next revision we didn't had this to compare the diff. So the pstates
dict was always empty and in the SequenceMatcher, to convert and empty pstate
to the states dictionary you would always insert. This patch keeps the matches
dictionary until the end of this window and clears it at once when this
window ends. This solves the above mentioned problem and also do not cause
any memory leak.
lfs: move the 'supportedoutgoingversions' handling to changegroup.py
This handling already exists here for the narrow extension. We still need to
either figure out how to enable changegroup v3 without the extension, or figure
out how to let the server detect that the client doesn't have it loaded, and
emit a user friendly error[1]. I can't tell if D1944 is the appropriate vehicle
for the latter.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-January/109550.html
obsolete: refactor function for getting obsolete options
The function for returning obsolete option values obtains all
options, validates, then returns the option that was requested.
Let's create a new function to return all obsolete option values
so callers needing multiple values can call that.
Differential Revision: https://phab.mercurial-scm.org/D2667
setup: install cbor packages
Without this, standalone installs don't have the cbor files.
Differential Revision: https://phab.mercurial-scm.org/D2949
wireproto: review fixups
Capture various TODOs and return an explicit value. This
represents feedback from Yuya and Augie on various commits.
Differential Revision: https://phab.mercurial-scm.org/D2944
cbor: add a __init__.py to top level cbor module
Differential Revision: https://phab.mercurial-scm.org/D2752
cbor: fix core test-check*
This patch fixes couple of test-check* tests by making sure they skip
testing the third party library cbor.
Differential Revision: https://phab.mercurial-scm.org/D2751
thirdparty: vendor cbor2 python library
CBOR stands for Concise Binary Object Representation, which is a data format
which is very compact and extensible.
This patch moves the python library which can serilaize and deserialize python
objects to/from cbor formats. The library is taken from
https://github.com/agronholm/cbor2/ from commit
84181540f6eb650437e3f73cd104a65661fe8e67.
Unrequired files from the cbor library - docs/, tests/, setup.py, setup.cfg,
and tox.ini - have not been vendored.
There is another python library for cbor at
https://github.com/brianolson/cbor_py/ which is used in evolve extension and was
imported in initial version of this series. That library though contains C code
and is bit faster, but has known bugs around serializing nested structures, is
unmaintained, raises an Exception object instead of a more dedicated Error type.
So, it's better to use a bug free and actively maintained library.
This library is not yet used and will be used in later commits.
# no-check-commit because we are importing a third library module
Differential Revision: https://phab.mercurial-scm.org/D2750