D6888: sidedata: add a new revision flag constant for side data

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Tue Oct 1 14:22:35 EDT 2019


Closed by commit rHGa12a9af7536c: sidedata: add a new revision flag constant for side data (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6888?vs=16646&id=16760

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

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

AFFECTED FILES
  mercurial/interfaces/repository.py
  mercurial/revlogutils/constants.py

CHANGE DETAILS

diff --git a/mercurial/revlogutils/constants.py b/mercurial/revlogutils/constants.py
--- a/mercurial/revlogutils/constants.py
+++ b/mercurial/revlogutils/constants.py
@@ -40,16 +40,23 @@
 REVIDX_ELLIPSIS = repository.REVISION_FLAG_ELLIPSIS
 # revision data is stored externally
 REVIDX_EXTSTORED = repository.REVISION_FLAG_EXTSTORED
+# revision data contains extra metadata not part of the official digest
+REVIDX_SIDEDATA = repository.REVISION_FLAG_SIDEDATA
 REVIDX_DEFAULT_FLAGS = 0
 # stable order in which flags need to be processed and their processors applied
 REVIDX_FLAGS_ORDER = [
     REVIDX_ISCENSORED,
     REVIDX_ELLIPSIS,
     REVIDX_EXTSTORED,
+    REVIDX_SIDEDATA,
 ]
 
 # bitmark for flags that could cause rawdata content change
-REVIDX_RAWTEXT_CHANGING_FLAGS = REVIDX_ISCENSORED | REVIDX_EXTSTORED
+REVIDX_RAWTEXT_CHANGING_FLAGS = (
+    REVIDX_ISCENSORED
+    | REVIDX_EXTSTORED
+    | REVIDX_SIDEDATA
+)
 
 SPARSE_REVLOG_MAX_CHAIN_LENGTH = 1000
 
diff --git a/mercurial/interfaces/repository.py b/mercurial/interfaces/repository.py
--- a/mercurial/interfaces/repository.py
+++ b/mercurial/interfaces/repository.py
@@ -35,9 +35,12 @@
 REVISION_FLAG_CENSORED = 1 << 15
 REVISION_FLAG_ELLIPSIS = 1 << 14
 REVISION_FLAG_EXTSTORED = 1 << 13
+REVISION_FLAG_SIDEDATA = 1 << 12
 
 REVISION_FLAGS_KNOWN = (
-    REVISION_FLAG_CENSORED | REVISION_FLAG_ELLIPSIS | REVISION_FLAG_EXTSTORED)
+    REVISION_FLAG_CENSORED | REVISION_FLAG_ELLIPSIS | REVISION_FLAG_EXTSTORED
+    | REVISION_FLAG_SIDEDATA
+)
 
 CG_DELTAMODE_STD = b'default'
 CG_DELTAMODE_PREV = b'previous'



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


More information about the Mercurial-devel mailing list