Patchwork D6895: sidedata: make sure we don't use the flag if there are not sidedata

login
register
mail settings
Submitter phabricator
Date Sept. 27, 2019, 4:18 p.m.
Message ID <differential-rev-PHID-DREV-ekyqyyqd7g4gm6jsz3w7-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41806/
State Superseded
Headers show

Comments

phabricator - Sept. 27, 2019, 4:18 p.m.
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




To: marmoute, durin42, indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

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")