Show More
@@ -34,7 +34,7 b' class mergestate(object):' | |||
|
34 | 34 | [type][length][content] |
|
35 | 35 | |
|
36 | 36 | Type is a single character, length is a 4 bytes integer, content is an |
|
37 |
arbitrary suites of bytes of leng |
|
|
37 | arbitrary suites of bytes of length `length`. | |
|
38 | 38 | |
|
39 | 39 | Type should be a letter. Capital letter are mandatory record, Mercurial |
|
40 | 40 | should abort if they are unknown. lower case record can be safely ignored. |
@@ -125,10 +125,10 b' class mergestate(object):' | |||
|
125 | 125 | while off < end: |
|
126 | 126 | rtype = data[off] |
|
127 | 127 | off += 1 |
|
128 |
leng |
|
|
128 | length = _unpack('>I', data[off:(off + 4)])[0] | |
|
129 | 129 | off += 4 |
|
130 |
record = data[off:(off + leng |
|
|
131 |
off += leng |
|
|
130 | record = data[off:(off + length)] | |
|
131 | off += length | |
|
132 | 132 | records.append((rtype, record)) |
|
133 | 133 | f.close() |
|
134 | 134 | except IOError, err: |
General Comments 0
You need to be logged in to leave comments.
Login now