Show More
@@ -3145,10 +3145,10 b' class revlog(object):' | |||
|
3145 | 3145 | |
|
3146 | 3146 | new_entries = [] |
|
3147 | 3147 | # append the new sidedata |
|
3148 |
with self._datafp(b'a+') as |
|
|
3148 | with self._datafp(b'a+') as dfh: | |
|
3149 | 3149 | # Maybe this bug still exists, see revlog._writeentry |
|
3150 |
|
|
|
3151 |
current_offset = |
|
|
3150 | dfh.seek(0, os.SEEK_END) | |
|
3151 | current_offset = dfh.tell() | |
|
3152 | 3152 | for rev in range(startrev, endrev + 1): |
|
3153 | 3153 | entry = self.index[rev] |
|
3154 | 3154 | new_sidedata, flags = sidedatautil.run_sidedata_helpers( |
@@ -3174,12 +3174,12 b' class revlog(object):' | |||
|
3174 | 3174 | entry = (new_offset_flags,) + entry[1:8] |
|
3175 | 3175 | entry += (current_offset, len(serialized_sidedata)) |
|
3176 | 3176 | |
|
3177 |
|
|
|
3177 | dfh.write(serialized_sidedata) | |
|
3178 | 3178 | new_entries.append(entry) |
|
3179 | 3179 | current_offset += len(serialized_sidedata) |
|
3180 | 3180 | |
|
3181 | 3181 | # rewrite the new index entries |
|
3182 |
with self._indexfp(b'r+') as |
|
|
3182 | with self._indexfp(b'r+') as ifh: | |
|
3183 | 3183 | fp.seek(startrev * self.index.entry_size) |
|
3184 | 3184 | for i, e in enumerate(new_entries): |
|
3185 | 3185 | rev = startrev + i |
@@ -3189,4 +3189,4 b' class revlog(object):' | |||
|
3189 | 3189 | header = self._format_flags | self._format_version |
|
3190 | 3190 | header = self.index.pack_header(header) |
|
3191 | 3191 | packed = header + packed |
|
3192 |
|
|
|
3192 | ifh.write(packed) |
General Comments 0
You need to be logged in to leave comments.
Login now