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

login
register
mail settings
Submitter phabricator
Date Oct. 1, 2019, 6:22 p.m.
Message ID <5e11c28497a50f1789058350b3125f01@localhost.localdomain>
Download mbox | patch
Permalink /patch/41911/
State Not Applicable
Headers show

Comments

phabricator - Oct. 1, 2019, 6:22 p.m.
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




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

Patch

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'