3080 assert not self._inline |
3080 assert not self._inline |
3081 if not helpers[1] and not helpers[2]: |
3081 if not helpers[1] and not helpers[2]: |
3082 # Nothing to generate or remove |
3082 # Nothing to generate or remove |
3083 return |
3083 return |
3084 |
3084 |
|
3085 # changelog implement some "delayed" writing mechanism that assume that |
|
3086 # all index data is writen in append mode and is therefor incompatible |
|
3087 # with the seeked write done in this method. The use of such "delayed" |
|
3088 # writing will soon be removed for revlog version that support side |
|
3089 # data, so for now, we only keep this simple assert to highlight the |
|
3090 # situation. |
|
3091 delayed = getattr(self, '_delayed', False) |
|
3092 diverted = getattr(self, '_divert', False) |
|
3093 if delayed and not diverted: |
|
3094 msg = "cannot rewrite_sidedata of a delayed revlog" |
|
3095 raise error.ProgrammingError(msg) |
|
3096 |
3085 new_entries = [] |
3097 new_entries = [] |
3086 # append the new sidedata |
3098 # append the new sidedata |
3087 with self._datafp(b'a+') as fp: |
3099 with self._datafp(b'a+') as fp: |
3088 # Maybe this bug still exists, see revlog._writeentry |
3100 # Maybe this bug still exists, see revlog._writeentry |
3089 fp.seek(0, os.SEEK_END) |
3101 fp.seek(0, os.SEEK_END) |