50 # add the magic null revision at -1 |
50 # add the magic null revision at -1 |
51 index.append((0, 0, 0, -1, -1, -1, -1, nullid)) |
51 index.append((0, 0, 0, -1, -1, -1, -1, nullid)) |
52 |
52 |
53 return index, cache |
53 return index, cache |
54 |
54 |
55 |
|
56 data_inlined = '\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x01\x8c' \ |
55 data_inlined = '\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00\x01\x8c' \ |
57 '\x00\x00\x04\x07\x00\x00\x00\x00\x00\x00\x15\x15\xff\xff\xff' \ |
56 '\x00\x00\x04\x07\x00\x00\x00\x00\x00\x00\x15\x15\xff\xff\xff' \ |
58 '\xff\xff\xff\xff\xff\xebG\x97\xb7\x1fB\x04\xcf\x13V\x81\tw\x1b' \ |
57 '\xff\xff\xff\xff\xff\xebG\x97\xb7\x1fB\x04\xcf\x13V\x81\tw\x1b' \ |
59 'w\xdduR\xda\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ |
58 'w\xdduR\xda\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \ |
60 'x\x9c\x9d\x93?O\xc30\x10\xc5\xf7|\x8a\xdb\x9a\xa8m\x06\xd8*\x95' \ |
59 'x\x9c\x9d\x93?O\xc30\x10\xc5\xf7|\x8a\xdb\x9a\xa8m\x06\xd8*\x95' \ |
92 '\x13\x00\x00\x00\x00\x01\xec\x00\x00\x03\x06\x00\x00\x00\x01' \ |
91 '\x13\x00\x00\x00\x00\x01\xec\x00\x00\x03\x06\x00\x00\x00\x01' \ |
93 '\x00\x00\x00\x03\x00\x00\x00\x02\xff\xff\xff\xff\x12\xcb\xeby1' \ |
92 '\x00\x00\x00\x03\x00\x00\x00\x02\xff\xff\xff\xff\x12\xcb\xeby1' \ |
94 '\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' \ |
93 '\xb6\r\x98B\xcb\x07\xbd`\x8f\x92\xd9\xc4\x84\xbdK\x00\x00\x00' \ |
95 '\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
94 '\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
96 |
95 |
|
96 def parse_index2(data, inline): |
|
97 index, chunkcache = parsers.parse_index2(data, inline) |
|
98 return list(index), chunkcache |
|
99 |
97 def runtest() : |
100 def runtest() : |
98 |
|
99 py_res_1 = py_parseindex(data_inlined, True) |
101 py_res_1 = py_parseindex(data_inlined, True) |
100 c_res_1 = parsers.parse_index2(data_inlined, True) |
102 c_res_1 = parse_index2(data_inlined, True) |
101 |
103 |
102 py_res_2 = py_parseindex(data_non_inlined, False) |
104 py_res_2 = py_parseindex(data_non_inlined, False) |
103 c_res_2 = parsers.parse_index2(data_non_inlined, False) |
105 c_res_2 = parse_index2(data_non_inlined, False) |
104 |
106 |
105 if py_res_1 != c_res_1: |
107 if py_res_1 != c_res_1: |
106 print "Parse index result (with inlined data) differs!" |
108 print "Parse index result (with inlined data) differs!" |
107 |
109 |
108 if py_res_2 != c_res_2: |
110 if py_res_2 != c_res_2: |