comparison mercurial/hg.py @ 47299:7edaf91c7886

updatecaches: use the `caches` argument instead of a special `full` value After a clone we want to update most cachem, but not exactly all of them. We can now cleanly express this. Differential Revision: https://phab.mercurial-scm.org/D10730
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 17 May 2021 15:42:18 +0200
parents bcafcd779d2e
children 1c7f3d911d0f
comparison
equal deleted inserted replaced
47298:e96f75857361 47299:7edaf91c7886
50 url, 50 url,
51 util, 51 util,
52 verify as verifymod, 52 verify as verifymod,
53 vfs as vfsmod, 53 vfs as vfsmod,
54 ) 54 )
55 from .interfaces import repository as repositorymod
55 from .utils import ( 56 from .utils import (
56 hashutil, 57 hashutil,
57 stringutil, 58 stringutil,
58 urlutil, 59 urlutil,
59 ) 60 )
1052 # here is a tiny windows were someone could end up writing the 1053 # here is a tiny windows were someone could end up writing the
1053 # repository before the cache are sure to be warm. This is "fine" 1054 # repository before the cache are sure to be warm. This is "fine"
1054 # as the only "bad" outcome would be some slowness. That potential 1055 # as the only "bad" outcome would be some slowness. That potential
1055 # slowness already affect reader. 1056 # slowness already affect reader.
1056 with destrepo.lock(): 1057 with destrepo.lock():
1057 destrepo.updatecaches(full=b"post-clone") 1058 destrepo.updatecaches(caches=repositorymod.CACHES_POST_CLONE)
1058 finally: 1059 finally:
1059 release(srclock, destlock) 1060 release(srclock, destlock)
1060 if cleandir is not None: 1061 if cleandir is not None:
1061 shutil.rmtree(cleandir, True) 1062 shutil.rmtree(cleandir, True)
1062 if srcpeer is not None: 1063 if srcpeer is not None: