Show More
@@ -5,8 +5,9 b'' | |||
|
5 | 5 | # This software may be used and distributed according to the terms |
|
6 | 6 | # of the GNU General Public License, incorporated herein by reference. |
|
7 | 7 | |
|
8 | from node import bin, nullid, nullrev | |
|
9 | import revlog, dirstate, struct, util, zlib | |
|
8 | from mercurial.node import bin, nullid, nullrev | |
|
9 | from mercurial import util | |
|
10 | import struct, zlib | |
|
10 | 11 | |
|
11 | 12 | _pack = struct.pack |
|
12 | 13 | _unpack = struct.unpack |
@@ -24,7 +25,14 b' def parse_manifest(mfdict, fdict, lines)' | |||
|
24 | 25 | mfdict[f] = bin(n) |
|
25 | 26 | |
|
26 | 27 | def parse_index(data, inline): |
|
27 | indexformatng = revlog.indexformatng | |
|
28 | def gettype(q): | |
|
29 | return int(q & 0xFFFF) | |
|
30 | ||
|
31 | def offset_type(offset, type): | |
|
32 | return long(long(offset) << 16 | type) | |
|
33 | ||
|
34 | indexformatng = ">Qiiiiii20s12x" | |
|
35 | ||
|
28 | 36 | s = struct.calcsize(indexformatng) |
|
29 | 37 | index = [] |
|
30 | 38 | cache = None |
@@ -52,8 +60,8 b' def parse_index(data, inline):' | |||
|
52 | 60 | off += s |
|
53 | 61 | |
|
54 | 62 | e = list(index[0]) |
|
55 |
type = |
|
|
56 |
e[0] = |
|
|
63 | type = gettype(e[0]) | |
|
64 | e[0] = offset_type(0, type) | |
|
57 | 65 | index[0] = tuple(e) |
|
58 | 66 | |
|
59 | 67 | # add the magic null revision at -1 |
@@ -64,7 +72,8 b' def parse_index(data, inline):' | |||
|
64 | 72 | def parse_dirstate(dmap, copymap, st): |
|
65 | 73 | parents = [st[:20], st[20: 40]] |
|
66 | 74 | # deref fields so they will be local in loop |
|
67 | e_size = struct.calcsize(dirstate._format) | |
|
75 | format = ">cllll" | |
|
76 | e_size = struct.calcsize(format) | |
|
68 | 77 | pos1 = 40 |
|
69 | 78 | l = len(st) |
|
70 | 79 |
General Comments 0
You need to be logged in to leave comments.
Login now