Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 47300:8b2d09c7e5cd
updatecaches: deprecate the `full` argument
Now that all users were migrated, we can use deprecate the old way. This would
give potential extensions code a heads up on the API change.
Differential Revision: https://phab.mercurial-scm.org/D10731
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 17 May 2021 15:24:46 +0200 |
parents | 7edaf91c7886 |
children | c887bab2dccf |
comparison
equal
deleted
inserted
replaced
47299:7edaf91c7886 | 47300:8b2d09c7e5cd |
---|---|
2752 # later call to `destroyed` will refresh them. | 2752 # later call to `destroyed` will refresh them. |
2753 return | 2753 return |
2754 | 2754 |
2755 unfi = self.unfiltered() | 2755 unfi = self.unfiltered() |
2756 | 2756 |
2757 if caches is None: | 2757 if full: |
2758 if full: | 2758 msg = ( |
2759 caches = repository.CACHES_ALL | 2759 "`full` argument for `repo.updatecaches` is deprecated\n" |
2760 if full == b"post-clone": | 2760 "(use `caches=repository.CACHE_ALL` instead)" |
2761 caches = repository.CACHES_POST_CLONE | 2761 ) |
2762 else: | 2762 self.ui.deprecwarn(msg, "5.9") |
2763 caches = repository.CACHES_DEFAULT | 2763 caches = repository.CACHES_ALL |
2764 if full == b"post-clone": | |
2765 caches = repository.CACHES_POST_CLONE | |
2766 caches = repository.CACHES_ALL | |
2767 elif caches is None: | |
2768 caches = repository.CACHES_DEFAULT | |
2764 | 2769 |
2765 if repository.CACHE_BRANCHMAP_SERVED in caches: | 2770 if repository.CACHE_BRANCHMAP_SERVED in caches: |
2766 if tr is None or tr.changes[b'origrepolen'] < len(self): | 2771 if tr is None or tr.changes[b'origrepolen'] < len(self): |
2767 # accessing the 'served' branchmap should refresh all the others, | 2772 # accessing the 'served' branchmap should refresh all the others, |
2768 self.ui.debug(b'updating the branch cache\n') | 2773 self.ui.debug(b'updating the branch cache\n') |