Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/branchmap.py @ 42151:07faf5c65190 stable
branchcache: don't verify all nodes while writing
nodes are verified either when they are added or used. In case of commits. we
will load the whole branchmap, only verify nodes for the branch on which we are
committing and then we write.
However before this patch, writing the branchmap was validating all the nodes
whereas it should not. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D6290
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Fri, 19 Apr 2019 23:13:28 +0300 |
parents | caebe5e7f4bd |
children | 7c0ece3cd3ee |
comparison
equal
deleted
inserted
replaced
42150:71d8b4d91616 | 42151:07faf5c65190 |
---|---|
339 cachekey = [hex(self.tipnode), '%d' % self.tiprev] | 339 cachekey = [hex(self.tipnode), '%d' % self.tiprev] |
340 if self.filteredhash is not None: | 340 if self.filteredhash is not None: |
341 cachekey.append(hex(self.filteredhash)) | 341 cachekey.append(hex(self.filteredhash)) |
342 f.write(" ".join(cachekey) + '\n') | 342 f.write(" ".join(cachekey) + '\n') |
343 nodecount = 0 | 343 nodecount = 0 |
344 for label, nodes in sorted(self.iteritems()): | 344 for label, nodes in sorted(self._entries.iteritems()): |
345 label = encoding.fromlocal(label) | 345 label = encoding.fromlocal(label) |
346 for node in nodes: | 346 for node in nodes: |
347 nodecount += 1 | 347 nodecount += 1 |
348 if node in self._closednodes: | 348 if node in self._closednodes: |
349 state = 'c' | 349 state = 'c' |