mercurial/localrepo.py
branchstable
changeset 47183 8be95673eb8a
parent 46907 ffd3e823a7e5
child 47233 bcafcd779d2e
equal deleted inserted replaced
47182:dff19fe2973c 47183:8be95673eb8a
  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