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

login
register
mail settings
Submitter phabricator
Date Sept. 9, 2019, 9:25 p.m.
Message ID <a8b48b3a0a6f025d4c1ec6e0ef755727@localhost.localdomain>
Download mbox | patch
Permalink /patch/41607/
State Not Applicable
Headers show

Comments

phabricator - Sept. 9, 2019, 9:25 p.m.
marmoute updated this revision to Diff 16480.

REPOSITORY
  rHG Mercurial

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

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
@@ -1817,7 +1817,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
@@ -1836,6 +1837,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,7 +129,7 @@ 
         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=()):
         # text passed to "addrevision" includes hg filelog metadata header
         if node is None:
             node = storageutil.hashrevisionsha1(text, p1, p2)