[Commented On] D10544: revlog: highlight current incompatibility in `rewrite_sidedata`
baymax (Baymax, Your Personal Patch-care Companion)
phabricator at mercurial-scm.org
Tue May 4 01:05:24 UTC 2021
baymax added a comment.
baymax updated this revision to Diff 27463.
✅ refresh by Heptapod after a successful CI run (🐙 💚)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10544?vs=27337&id=27463
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10544/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10544
AFFECTED FILES
mercurial/revlog.py
CHANGE DETAILS
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -3082,6 +3082,18 @@
# Nothing to generate or remove
return
+ # changelog implement some "delayed" writing mechanism that assume that
+ # all index data is writen in append mode and is therefor incompatible
+ # with the seeked write done in this method. The use of such "delayed"
+ # writing will soon be removed for revlog version that support side
+ # data, so for now, we only keep this simple assert to highlight the
+ # situation.
+ delayed = getattr(self, '_delayed', False)
+ diverted = getattr(self, '_divert', False)
+ if delayed and not diverted:
+ msg = "cannot rewrite_sidedata of a delayed revlog"
+ raise error.ProgrammingError(msg)
+
new_entries = []
# append the new sidedata
with self._datafp(b'a+') as fp:
To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210504/4886b80f/attachment-0002.html>
More information about the Mercurial-patches
mailing list