changeset 42772:5c2e8a661418

rawdata: update callers in sqlitestore We update callers incrementally because this help bisecting failures. This was useful during development, so we expect it might be useful again in the future.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 07 Aug 2019 20:09:53 +0200
parents fdeb4c1d23d5
children 127d57e950e0
files hgext/sqlitestore.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/sqlitestore.py	Wed Aug 07 22:35:12 2019 +0200
+++ b/hgext/sqlitestore.py	Wed Aug 07 20:09:53 2019 +0200
@@ -657,8 +657,7 @@
             # patch operation.
             if baserev != nullrev and self.iscensored(baserev):
                 hlen = struct.calcsize('>lll')
-                oldlen = len(self.revision(deltabase, raw=True,
-                                           _verifyhash=False))
+                oldlen = len(self.rawdata(deltabase, _verifyhash=False))
                 newlen = len(delta) - hlen
 
                 if delta[:hlen] != mdiff.replacediffheader(oldlen, newlen):
@@ -667,7 +666,7 @@
 
             if (not (storeflags & FLAG_CENSORED)
                 and storageutil.deltaiscensored(
-                    delta, baserev, lambda x: len(self.revision(x, raw=True)))):
+                    delta, baserev, lambda x: len(self.rawdata(x)))):
                 storeflags |= FLAG_CENSORED
 
             linkrev = linkmapper(linknode)
@@ -720,7 +719,7 @@
 
         # This restriction is cargo culted from revlogs and makes no sense for
         # SQLite, since columns can be resized at will.
-        if len(tombstone) > len(self.revision(censornode, raw=True)):
+        if len(tombstone) > len(self.rawdata(censornode)):
             raise error.Abort(_('censor tombstone must be no longer than '
                                 'censored data'))