Show More
@@ -217,9 +217,23 b' def _addlistdelta(addlist, x):' | |||
|
217 | 217 | + content for start, end, content in x) |
|
218 | 218 | return deltatext, newaddlist |
|
219 | 219 | |
|
220 | # Pure Python fallback | |
|
221 | def _parsemanifest(mfdict, fdict, lines): | |
|
222 | bin = revlog.bin | |
|
223 | for l in lines.splitlines(): | |
|
224 | f, n = l.split('\0') | |
|
225 | if len(n) > 40: | |
|
226 | fdict[f] = n[40:] | |
|
227 | mfdict[f] = bin(n[:40]) | |
|
228 | else: | |
|
229 | mfdict[f] = bin(n) | |
|
230 | ||
|
220 | 231 | def _parse(lines): |
|
221 | 232 | mfdict = manifestdict() |
|
233 | try: | |
|
222 | 234 | parsers.parse_manifest(mfdict, mfdict._flags, lines) |
|
235 | except AttributeError: | |
|
236 | _parsemanifest(mfdict, mfdict._flags, lines) | |
|
223 | 237 | return mfdict |
|
224 | 238 | |
|
225 | 239 | class manifest(revlog.revlog): |
@@ -5,7 +5,7 b'' | |||
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 |
from mercurial.node import |
|
|
8 | from mercurial.node import nullid | |
|
9 | 9 | from mercurial import util |
|
10 | 10 | import struct, zlib, cStringIO |
|
11 | 11 | |
@@ -21,15 +21,6 b' def dirstatetuple(*x):' | |||
|
21 | 21 | # x is a tuple |
|
22 | 22 | return x |
|
23 | 23 | |
|
24 | def parse_manifest(mfdict, fdict, lines): | |
|
25 | for l in lines.splitlines(): | |
|
26 | f, n = l.split('\0') | |
|
27 | if len(n) > 40: | |
|
28 | fdict[f] = n[40:] | |
|
29 | mfdict[f] = bin(n[:40]) | |
|
30 | else: | |
|
31 | mfdict[f] = bin(n) | |
|
32 | ||
|
33 | 24 | def parse_index2(data, inline): |
|
34 | 25 | def gettype(q): |
|
35 | 26 | return int(q & 0xFFFF) |
General Comments 0
You need to be logged in to leave comments.
Login now