##// END OF EJS Templates
revlog: use `_writing` in `rewrite_sidedata`...
marmoute -
r47992:b3acefde default
parent child Browse files
Show More
@@ -3157,8 +3157,8 b' class revlog(object):'
3157
3157
3158 new_entries = []
3158 new_entries = []
3159 # append the new sidedata
3159 # append the new sidedata
3160 with self._datafp(b'a+') as dfh:
3160 with self._writing(transaction):
3161 # Maybe this bug still exists, see revlog._writeentry
3161 ifh, dfh = self._writinghandles
3162 dfh.seek(0, os.SEEK_END)
3162 dfh.seek(0, os.SEEK_END)
3163 current_offset = dfh.tell()
3163 current_offset = dfh.tell()
3164 for rev in range(startrev, endrev + 1):
3164 for rev in range(startrev, endrev + 1):
@@ -3192,9 +3192,8 b' class revlog(object):'
3192 new_entries.append(entry)
3192 new_entries.append(entry)
3193 current_offset += len(serialized_sidedata)
3193 current_offset += len(serialized_sidedata)
3194
3194
3195 # rewrite the new index entries
3195 # rewrite the new index entries
3196 with self._indexfp(b'r+') as ifh:
3196 ifh.seek(startrev * self.index.entry_size)
3197 fp.seek(startrev * self.index.entry_size)
3198 for i, e in enumerate(new_entries):
3197 for i, e in enumerate(new_entries):
3199 rev = startrev + i
3198 rev = startrev + i
3200 self.index.replace_sidedata_info(rev, e[8], e[9], e[0])
3199 self.index.replace_sidedata_info(rev, e[8], e[9], e[0])
General Comments 0
You need to be logged in to leave comments. Login now