D6895: sidedata: make sure we don't use the flag if there are not sidedata
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Sep 27 16:18:20 UTC 2019
marmoute created this revision.
marmoute added a reviewer: durin42.
Herald added a reviewer: indygreg.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Ensuring this at this level seems safer than relying on caller doing the right
thing.
G: changed mercurial/revlog.py
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D6895
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
@@ -1864,6 +1864,7 @@
if sidedata is None:
sidedata = {}
+ flags = flags & ~REVIDX_SIDEDATA
elif not self.hassidedata:
raise error.ProgrammingError(
_("trying to add sidedata to a revlog who don't support them")
To: marmoute, durin42, indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list