annotate mercurial/thirdparty/xdiff/xinclude.h @ 39845:e6d3d39cc1c7

revlog: use proper version comparison during verify Verify appears to want to compare the changelog's revlog version number with the version number of filelogs and error if they are different. But what it was actually doing was comparing the full 32-bit header integer, which contains 2 shorts: 1 for the revlog version number and 1 for feature flags. This commit tweaks the verification code so it only looks at the version number component of the header and emits a warning if they differ. The new code is more robust because it accounts for future revlog version numbers without them needing to be special cased. Differential Revision: https://phab.mercurial-scm.org/D4704
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 19 Sep 2018 11:38:05 -0700
parents a2baa61bbb14
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36671
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
1 /*
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
2 * LibXDiff by Davide Libenzi ( File Differential Library )
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
3 * Copyright (C) 2003 Davide Libenzi
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
4 *
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
5 * This library is free software; you can redistribute it and/or
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
7 * License as published by the Free Software Foundation; either
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
8 * version 2.1 of the License, or (at your option) any later version.
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
9 *
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
10 * This library is distributed in the hope that it will be useful,
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
13 * Lesser General Public License for more details.
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
14 *
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
16 * License along with this library; if not, see
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
17 * <http://www.gnu.org/licenses/>.
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
18 *
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
19 * Davide Libenzi <davidel@xmailserver.org>
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
20 *
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
21 */
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
22
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
23 #if !defined(XINCLUDE_H)
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
24 #define XINCLUDE_H
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
25
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
26 #include <ctype.h>
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
27 #include <stdio.h>
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
28 #include <stdlib.h>
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
29 #include <string.h>
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
30 #include <limits.h>
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
31
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
32 #include "xmacros.h"
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
33 #include "xdiff.h"
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
34 #include "xtypes.h"
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
35 #include "xutils.h"
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
36 #include "xprepare.h"
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
37 #include "xdiffi.h"
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
38
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
39
34e2ff1f9cd8 xdiff: vendor xdiff library from git
Jun Wu <quark@fb.com>
parents:
diff changeset
40 #endif /* #if !defined(XINCLUDE_H) */