The copy will not be mark as verified, so there is no need to verify nodes.
Thanks to Yuya who spotted this while reviewing.
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGb26455ffa7fa: branchcache: don't verify while creating a copy
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
Comment Actions
def copy(self): """return an deep copy of the branchcache object"""
- self._verifyall() return type(self)( self._entries, self.tipnode, self.tiprev, self.filteredhash, self._closednodes)
Looks good, but it's probably better to copy the verification state to
new instance, or simply make branchcache() start with "verified" state.
IIUC, only branches loaded from file have to be validated.