Show More
@@ -168,6 +168,23 b' def writebundle(ui, cg, filename, bundle' | |||||
168 | return writechunks(ui, chunkiter, filename, vfs=vfs) |
|
168 | return writechunks(ui, chunkiter, filename, vfs=vfs) | |
169 |
|
169 | |||
170 | class cg1unpacker(object): |
|
170 | class cg1unpacker(object): | |
|
171 | """Unpacker for cg1 changegroup streams. | |||
|
172 | ||||
|
173 | A changegroup unpacker handles the framing of the revision data in | |||
|
174 | the wire format. Most consumers will want to use the apply() | |||
|
175 | method to add the changes from the changegroup to a repository. | |||
|
176 | ||||
|
177 | If you're forwarding a changegroup unmodified to another consumer, | |||
|
178 | use getchunks(), which returns an iterator of changegroup | |||
|
179 | chunks. This is mostly useful for cases where you need to know the | |||
|
180 | data stream has ended by observing the end of the changegroup. | |||
|
181 | ||||
|
182 | deltachunk() is useful only if you're applying delta data. Most | |||
|
183 | consumers should prefer apply() instead. | |||
|
184 | ||||
|
185 | A few other public methods exist. Those are used only for | |||
|
186 | bundlerepo and some debug commands - their use is discouraged. | |||
|
187 | """ | |||
171 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER |
|
188 | deltaheader = _CHANGEGROUPV1_DELTA_HEADER | |
172 | deltaheadersize = struct.calcsize(deltaheader) |
|
189 | deltaheadersize = struct.calcsize(deltaheader) | |
173 | version = '01' |
|
190 | version = '01' | |
@@ -463,6 +480,12 b' class cg1unpacker(object):' | |||||
463 | return dh + 1 |
|
480 | return dh + 1 | |
464 |
|
481 | |||
465 | class cg2unpacker(cg1unpacker): |
|
482 | class cg2unpacker(cg1unpacker): | |
|
483 | """Unpacker for cg2 streams. | |||
|
484 | ||||
|
485 | cg2 streams add support for generaldelta, so the delta header | |||
|
486 | format is slightly different. All other features about the data | |||
|
487 | remain the same. | |||
|
488 | """ | |||
466 | deltaheader = _CHANGEGROUPV2_DELTA_HEADER |
|
489 | deltaheader = _CHANGEGROUPV2_DELTA_HEADER | |
467 | deltaheadersize = struct.calcsize(deltaheader) |
|
490 | deltaheadersize = struct.calcsize(deltaheader) | |
468 | version = '02' |
|
491 | version = '02' |
General Comments 0
You need to be logged in to leave comments.
Login now