Mercurial > hg
comparison mercurial/repair.py @ 31799:8110d49e0558 stable
repair: use rawvfs when copying extra store files
If we use the normal vfs, store encoding will be applied when we
.join() the path to be copied. This results in attempting to copy
a file that (likely) doesn't exist. Using the rawvfs operates on
the raw file path, which is returned by vfs.readdir().
Users at Mozilla are encountering this, as I've instructed them to
run `hg debugupgraderepo` to upgrade to generaldelta. While Mercurial
shouldn't deposit any files under .hg/store that require encoding, it
is possible for e.g. .DS_Store files to be created by the operating
system.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 08 Apr 2017 11:36:39 -0700 |
parents | 0b913e1e725b |
children | b6d792a9bd11 |
comparison
equal
deleted
inserted
replaced
31798:8c9178d647f7 | 31799:8110d49e0558 |
---|---|
873 if not _upgradefilterstorefile(srcrepo, dstrepo, requirements, | 873 if not _upgradefilterstorefile(srcrepo, dstrepo, requirements, |
874 p, kind, st): | 874 p, kind, st): |
875 continue | 875 continue |
876 | 876 |
877 srcrepo.ui.write(_('copying %s\n') % p) | 877 srcrepo.ui.write(_('copying %s\n') % p) |
878 src = srcrepo.store.vfs.join(p) | 878 src = srcrepo.store.rawvfs.join(p) |
879 dst = dstrepo.store.vfs.join(p) | 879 dst = dstrepo.store.rawvfs.join(p) |
880 util.copyfile(src, dst, copystat=True) | 880 util.copyfile(src, dst, copystat=True) |
881 | 881 |
882 _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements) | 882 _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements) |
883 | 883 |
884 ui.write(_('data fully migrated to temporary repository\n')) | 884 ui.write(_('data fully migrated to temporary repository\n')) |