Mercurial > public > mercurial-scm > hg-stable
diff mercurial/streamclone.py @ 46989:aed6ceaad6d7
streamclone: treat volatile file as "fullfile"
The nodemap related file might change (or get deleted) during the stream clone
in a way incompatible with the streaming process.
So we introduce a new flag for this type of file and integrate it with the
existing `revlog_type` field recently added to `store.walk` returns.
We use that new flat to dispatch such file to the existing mechanism for "atomic
replacement" file for the nodemap docket and datafile. This fix the bugs we have
been adding tests for.
Strictly speaking, the nodemap datafile is happened only a could maybe be used
in a slightly more efficient way, however this is good enough for now.
Differential Revision: https://phab.mercurial-scm.org/D10481
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 20 Apr 2021 05:08:55 +0200 |
parents | faa43f09ad98 |
children | 65c519661991 2f4ca4807033 |
line wrap: on
line diff
--- a/mercurial/streamclone.py Mon Apr 19 20:47:46 2021 +0200 +++ b/mercurial/streamclone.py Tue Apr 20 05:08:55 2021 +0200 @@ -628,7 +628,10 @@ repo.ui.debug(b'scanning\n') for rl_type, name, ename, size in _walkstreamfiles(repo, matcher): if size: - entries.append((_srcstore, name, _fileappend, size)) + ft = _fileappend + if rl_type & store.FILEFLAGS_VOLATILE: + ft = _filefull + entries.append((_srcstore, name, ft, size)) totalfilesize += size for name in _walkstreamfullstorefiles(repo): if repo.svfs.exists(name):