comparison mercurial/revlogutils/deltas.py @ 47457:f8330a3fc39f

censor: implement censoring for revlogv2 It is a bit verbose and rough, but it works. Most of that logic can be common for `stripping`, so we can expect more refactoring of that code to accommodate both needs. However I wanted to keep this changesets "simple enough" and before moving forward. We also need to properly delete the older index/data/sidedata file, but this has implication for streaming clone and transaction, so this will come later. Differential Revision: https://phab.mercurial-scm.org/D10869
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 07 Jun 2021 11:59:27 +0200
parents 93f4e183b3f5
children c514936d92b4
comparison
equal deleted inserted replaced
47456:93f4e183b3f5 47457:f8330a3fc39f
1068 `excluded_bases` is an optional set of revision that cannot be used as 1068 `excluded_bases` is an optional set of revision that cannot be used as
1069 a delta base. Use this to recompute delta suitable in censor or strip 1069 a delta base. Use this to recompute delta suitable in censor or strip
1070 context. 1070 context.
1071 """ 1071 """
1072 if target_rev is None: 1072 if target_rev is None:
1073 curr = len(self.revlog) 1073 target_rev = len(self.revlog)
1074 1074
1075 if not revinfo.textlen: 1075 if not revinfo.textlen:
1076 return self._fullsnapshotinfo(fh, revinfo, target_rev) 1076 return self._fullsnapshotinfo(fh, revinfo, target_rev)
1077 1077
1078 if excluded_bases is None: 1078 if excluded_bases is None: