Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 47244:bcafcd779d2e
branching: merge stable into default
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Mon, 17 May 2021 15:05:24 +0200 |
parents | 21b3e6116bd1 8be95673eb8a |
children | 6597255a4f94 |
comparison
equal
deleted
inserted
replaced
47243:33096e77598c | 47244:bcafcd779d2e |
---|---|
2725 will be available in the 'tr' argument. This can be used to selectively | 2725 will be available in the 'tr' argument. This can be used to selectively |
2726 update caches relevant to the changes in that transaction. | 2726 update caches relevant to the changes in that transaction. |
2727 | 2727 |
2728 If 'full' is set, make sure all caches the function knows about have | 2728 If 'full' is set, make sure all caches the function knows about have |
2729 up-to-date data. Even the ones usually loaded more lazily. | 2729 up-to-date data. Even the ones usually loaded more lazily. |
2730 | |
2731 The `full` argument can take a special "post-clone" value. In this case | |
2732 the cache warming is made after a clone and of the slower cache might | |
2733 be skipped, namely the `.fnodetags` one. This argument is 5.8 specific | |
2734 as we plan for a cleaner way to deal with this for 5.9. | |
2730 """ | 2735 """ |
2731 if tr is not None and tr.hookargs.get(b'source') == b'strip': | 2736 if tr is not None and tr.hookargs.get(b'source') == b'strip': |
2732 # During strip, many caches are invalid but | 2737 # During strip, many caches are invalid but |
2733 # later call to `destroyed` will refresh them. | 2738 # later call to `destroyed` will refresh them. |
2734 return | 2739 return |
2752 | 2757 |
2753 # ensure the working copy parents are in the manifestfulltextcache | 2758 # ensure the working copy parents are in the manifestfulltextcache |
2754 for ctx in self[b'.'].parents(): | 2759 for ctx in self[b'.'].parents(): |
2755 ctx.manifest() # accessing the manifest is enough | 2760 ctx.manifest() # accessing the manifest is enough |
2756 | 2761 |
2757 # accessing fnode cache warms the cache | 2762 if not full == b"post-clone": |
2758 tagsmod.fnoderevs(self.ui, unfi, unfi.changelog.revs()) | 2763 # accessing fnode cache warms the cache |
2764 tagsmod.fnoderevs(self.ui, unfi, unfi.changelog.revs()) | |
2759 # accessing tags warm the cache | 2765 # accessing tags warm the cache |
2760 self.tags() | 2766 self.tags() |
2761 self.filtered(b'served').tags() | 2767 self.filtered(b'served').tags() |
2762 | 2768 |
2763 # The `full` arg is documented as updating even the lazily-loaded | 2769 # The `full` arg is documented as updating even the lazily-loaded |