Commit Graph

6 Commits

Author SHA1 Message Date
Gregory Szorc
5bcef1853c revlog: tweak wording and logic for flags validation
First, the logic around the if..elif..elif was subtly wrong
and sub-optimal because all branches would be tested as long as
the revlog was valid. This patch changes things so it behaves like
a switch statement over the revlog version.

While I was here, I also tweaked error strings to make them
consistent and to read better.
2017-05-19 20:10:50 -07:00
Gregory Szorc
bf38320f87 tests: tests for revlog version and flags loading
We didn't have explicit test coverage of these branches.
Better late than never.
2017-05-19 20:01:35 -07:00
Yuya Nishihara
5fe7742660 mpatch: switch to policy importer 2016-08-13 12:18:58 +09:00
Maciej Fijalkowski
a294e6bdcf pypy: fix overeager pattern matching on mpatchError
Pypy have difference in error reporting.
2016-04-05 10:59:46 +03:00
timeless
4fca2b2f02 mpatch: unify mpatchError (issue5182)
The pure version was mpatch was throwing struct.error or ValueError
for errors, whereas the C version was throwing an "mpatch.mpatchError".

Introducing an mpatch.mpatchError into pure and using it consistently
is fairly easy, but the actual form for it is mercurial.mpatch.mpatchError,
so with this commit, we change the C implementation to match the naming
convention too.
2016-03-31 02:05:28 +00:00
Matt Mackall
4622bdc826 parsers: fix list sizing rounding error (SEC)
CVE-2016-3630 (1/2)

This addresses part of a vulnerability in application of binary
deltas.
2016-03-16 17:29:29 -07:00