Patchwork D6814: revlog: add a `sidedata` parameters to addrevision

login
register
mail settings
Submitter phabricator
Date Sept. 27, 2019, 3:06 p.m.
Message ID <960937ed786885866553e67b0c88c745@localhost.localdomain>
Download mbox | patch
Permalink /patch/41784/
State Not Applicable
Headers show

Comments

phabricator - Sept. 27, 2019, 3:06 p.m.
Closed by commit rHG33532939c667: revlog: add a `sidedata` parameters to addrevision (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6814?vs=16601&id=16634

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6814/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6814

AFFECTED FILES
  hgext/remotefilelog/remotefilelog.py
  mercurial/revlog.py

CHANGE DETAILS




To: marmoute, yuja, 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
@@ -1816,7 +1816,8 @@ 
         """
 
     def addrevision(self, text, transaction, link, p1, p2, cachedelta=None,
-                    node=None, flags=REVIDX_DEFAULT_FLAGS, deltacomputer=None):
+                    node=None, flags=REVIDX_DEFAULT_FLAGS, deltacomputer=None,
+                    sidedata=None):
         """add a revision to the log
 
         text - the revision data to add
@@ -1835,6 +1836,9 @@ 
             raise error.RevlogError(_("attempted to add linkrev -1 to %s")
                                     % self.indexfile)
 
+        if sidedata is None:
+            sidedata = {}
+
         if flags:
             node = node or self.hash(text, p1, p2)
 
diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py
+++ b/hgext/remotefilelog/remotefilelog.py
@@ -129,10 +129,13 @@ 
         return data
 
     def addrevision(self, text, transaction, linknode, p1, p2, cachedelta=None,
-                    node=None, flags=revlog.REVIDX_DEFAULT_FLAGS):
+                    node=None, flags=revlog.REVIDX_DEFAULT_FLAGS,
+                    sidedata=None):
         # text passed to "addrevision" includes hg filelog metadata header
         if node is None:
             node = storageutil.hashrevisionsha1(text, p1, p2)
+        if sidedata is None:
+            sidedata = {}
 
         meta, metaoffset = storageutil.parsemeta(text)
         rawtext, validatehash = self._processflagswrite(text, flags)