Show More
@@ -288,6 +288,7 b' class sqliterevisiondelta(object):' | |||||
288 | baserevisionsize = attr.ib() |
|
288 | baserevisionsize = attr.ib() | |
289 | revision = attr.ib() |
|
289 | revision = attr.ib() | |
290 | delta = attr.ib() |
|
290 | delta = attr.ib() | |
|
291 | sidedata = attr.ib() | |||
291 | linknode = attr.ib(default=None) |
|
292 | linknode = attr.ib(default=None) | |
292 |
|
293 | |||
293 |
|
294 | |||
@@ -908,6 +909,10 b' class sqlitefilestore(object):' | |||||
908 | def files(self): |
|
909 | def files(self): | |
909 | return [] |
|
910 | return [] | |
910 |
|
911 | |||
|
912 | def sidedata(self, nodeorrev, _df=None): | |||
|
913 | # Not supported for now | |||
|
914 | return {} | |||
|
915 | ||||
911 | def storageinfo( |
|
916 | def storageinfo( | |
912 | self, |
|
917 | self, | |
913 | exclusivefiles=False, |
|
918 | exclusivefiles=False, |
@@ -618,6 +618,13 b' def _revisiondeltatochunks(delta, header' | |||||
618 | yield prefix |
|
618 | yield prefix | |
619 | yield data |
|
619 | yield data | |
620 |
|
620 | |||
|
621 | sidedata = delta.sidedata | |||
|
622 | if sidedata is not None: | |||
|
623 | # Need a separate chunk for sidedata to be able to differentiate | |||
|
624 | # "raw delta" length and sidedata length | |||
|
625 | yield chunkheader(len(sidedata)) | |||
|
626 | yield sidedata | |||
|
627 | ||||
621 |
|
628 | |||
622 | def _sortnodesellipsis(store, nodes, cl, lookup): |
|
629 | def _sortnodesellipsis(store, nodes, cl, lookup): | |
623 | """Sort nodes for changegroup generation.""" |
|
630 | """Sort nodes for changegroup generation.""" |
@@ -453,6 +453,10 b' class irevisiondelta(interfaceutil.Inter' | |||||
453 | """ |
|
453 | """ | |
454 | ) |
|
454 | ) | |
455 |
|
455 | |||
|
456 | sidedata = interfaceutil.Attribute( | |||
|
457 | """Raw sidedata bytes for the given revision.""" | |||
|
458 | ) | |||
|
459 | ||||
456 |
|
460 | |||
457 | class ifilerevisionssequence(interfaceutil.Interface): |
|
461 | class ifilerevisionssequence(interfaceutil.Interface): | |
458 | """Contains index data for all revisions of a file. |
|
462 | """Contains index data for all revisions of a file. |
@@ -204,6 +204,7 b' class revlogrevisiondelta(object):' | |||||
204 | baserevisionsize = attr.ib() |
|
204 | baserevisionsize = attr.ib() | |
205 | revision = attr.ib() |
|
205 | revision = attr.ib() | |
206 | delta = attr.ib() |
|
206 | delta = attr.ib() | |
|
207 | sidedata = attr.ib() | |||
207 | linknode = attr.ib(default=None) |
|
208 | linknode = attr.ib(default=None) | |
208 |
|
209 | |||
209 |
|
210 | |||
@@ -2587,6 +2588,7 b' class revlog(object):' | |||||
2587 | dfh, |
|
2588 | dfh, | |
2588 | alwayscache=alwayscache, |
|
2589 | alwayscache=alwayscache, | |
2589 | deltacomputer=deltacomputer, |
|
2590 | deltacomputer=deltacomputer, | |
|
2591 | sidedata=sidedata, | |||
2590 | ) |
|
2592 | ) | |
2591 |
|
2593 | |||
2592 | if addrevisioncb: |
|
2594 | if addrevisioncb: |
@@ -1158,7 +1158,7 b' class ifilemutationtests(basetestcase):' | |||||
1158 | f = self._makefilefn() |
|
1158 | f = self._makefilefn() | |
1159 |
|
1159 | |||
1160 | deltas = [ |
|
1160 | deltas = [ | |
1161 | (node0, nullid, nullid, nullid, nullid, delta0, 0), |
|
1161 | (node0, nullid, nullid, nullid, nullid, delta0, 0, {}), | |
1162 | ] |
|
1162 | ] | |
1163 |
|
1163 | |||
1164 | with self._maketransactionfn() as tr: |
|
1164 | with self._maketransactionfn() as tr: | |
@@ -1214,7 +1214,9 b' class ifilemutationtests(basetestcase):' | |||||
1214 | for i, fulltext in enumerate(fulltexts): |
|
1214 | for i, fulltext in enumerate(fulltexts): | |
1215 | delta = mdiff.trivialdiffheader(len(fulltext)) + fulltext |
|
1215 | delta = mdiff.trivialdiffheader(len(fulltext)) + fulltext | |
1216 |
|
1216 | |||
1217 | deltas.append((nodes[i], nullid, nullid, nullid, nullid, delta, 0)) |
|
1217 | deltas.append( | |
|
1218 | (nodes[i], nullid, nullid, nullid, nullid, delta, 0, {}) | |||
|
1219 | ) | |||
1218 |
|
1220 | |||
1219 | with self._maketransactionfn() as tr: |
|
1221 | with self._maketransactionfn() as tr: | |
1220 | newnodes = [] |
|
1222 | newnodes = [] | |
@@ -1262,7 +1264,9 b' class ifilemutationtests(basetestcase):' | |||||
1262 | ) |
|
1264 | ) | |
1263 |
|
1265 | |||
1264 | delta = mdiff.textdiff(b'bar\n' * 30, (b'bar\n' * 30) + b'baz\n') |
|
1266 | delta = mdiff.textdiff(b'bar\n' * 30, (b'bar\n' * 30) + b'baz\n') | |
1265 | deltas = [(b'\xcc' * 20, node1, nullid, b'\x01' * 20, node1, delta, 0)] |
|
1267 | deltas = [ | |
|
1268 | (b'\xcc' * 20, node1, nullid, b'\x01' * 20, node1, delta, 0, {}) | |||
|
1269 | ] | |||
1266 |
|
1270 | |||
1267 | with self._maketransactionfn() as tr: |
|
1271 | with self._maketransactionfn() as tr: | |
1268 | with self.assertRaises(error.CensoredBaseError): |
|
1272 | with self.assertRaises(error.CensoredBaseError): |
General Comments 0
You need to be logged in to leave comments.
Login now