Patchwork D10896: revlog: rewrite `censors.py` to `rewrite.py`

login
register
mail settings
Submitter phabricator
Date June 22, 2021, 11:27 p.m.
Message ID <differential-rev-PHID-DREV-ffmsaadiyxouiy3wgkkl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49214/
State Superseded
Headers show

Comments

phabricator - June 22, 2021, 11:27 p.m.
marmoute created this revision.
Herald added a reviewer: indygreg.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The logic we use for censoring revision will be mostly common with the one we
  needs for stripping. So we rename the module to `rewrite` to better match its
  future content.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/revlog.py
  mercurial/revlogutils/censor.py
  mercurial/revlogutils/rewrite.py

CHANGE DETAILS




To: marmoute, indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/revlogutils/censor.py b/mercurial/revlogutils/rewrite.py
rename from mercurial/revlogutils/censor.py
rename to mercurial/revlogutils/rewrite.py
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -81,13 +81,13 @@ 
     util as interfaceutil,
 )
 from .revlogutils import (
-    censor,
     deltas as deltautil,
     docket as docketutil,
     flagutil,
     nodemap as nodemaputil,
     randomaccessfile,
     revlogv0,
+    rewrite,
     sidedata as sidedatautil,
 )
 from .utils import (
@@ -3068,9 +3068,9 @@ 
                 % self._format_version
             )
         elif self._format_version == REVLOGV1:
-            censor.v1_censor(self, tr, censornode, tombstone)
+            rewrite.v1_censor(self, tr, censornode, tombstone)
         else:
-            censor.v2_censor(self, tr, censornode, tombstone)
+            rewrite.v2_censor(self, tr, censornode, tombstone)
 
     def verifyintegrity(self, state):
         """Verifies the integrity of the revlog.