Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/filelog.py @ 47817:2813d406b036 stable 5.9rc1
issue6528: add a config option to control the fixing on the fly
This will allow people who know to be safe to avoid any performance overhead
(and other potential issue).
Differential Revision: https://phab.mercurial-scm.org/D11271
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 07 Aug 2021 16:51:47 +0200 |
parents | c30ca163b45e |
children | c514936d92b4 |
comparison
equal
deleted
inserted
replaced
47816:c30ca163b45e | 47817:2813d406b036 |
---|---|
36 ) | 36 ) |
37 # Full name of the user visible file, relative to the repository root. | 37 # Full name of the user visible file, relative to the repository root. |
38 # Used by LFS. | 38 # Used by LFS. |
39 self._revlog.filename = path | 39 self._revlog.filename = path |
40 self.nullid = self._revlog.nullid | 40 self.nullid = self._revlog.nullid |
41 opts = opener.options | |
42 self._fix_issue6528 = opts.get(b'issue6528.fix-incoming', True) | |
41 | 43 |
42 def __len__(self): | 44 def __len__(self): |
43 return len(self._revlog) | 45 return len(self._revlog) |
44 | 46 |
45 def __iter__(self): | 47 def __iter__(self): |
158 ) | 160 ) |
159 ) | 161 ) |
160 | 162 |
161 with self._revlog._writing(transaction): | 163 with self._revlog._writing(transaction): |
162 | 164 |
163 deltas = rewrite.filter_delta_issue6528(self._revlog, deltas) | 165 if self._fix_issue6528: |
166 deltas = rewrite.filter_delta_issue6528(self._revlog, deltas) | |
164 | 167 |
165 return self._revlog.addgroup( | 168 return self._revlog.addgroup( |
166 deltas, | 169 deltas, |
167 linkmapper, | 170 linkmapper, |
168 transaction, | 171 transaction, |