Mercurial > hg
comparison mercurial/repair.py @ 31232:254f98326eef
vfs: use 'vfs' module directly in 'mercurial.repair'
Now that the 'vfs' classes moved in their own module, lets use the new module
directly. We update code iteratively to help with possible bisect needs in the
future.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 02 Mar 2017 13:29:43 +0100 |
parents | 22fbca1d11ed |
children | e712a9c35fd8 |
comparison
equal
deleted
inserted
replaced
31231:0a38a313033e | 31232:254f98326eef |
---|---|
24 manifest, | 24 manifest, |
25 obsolete, | 25 obsolete, |
26 revlog, | 26 revlog, |
27 scmutil, | 27 scmutil, |
28 util, | 28 util, |
29 vfs as vfsmod, | |
29 ) | 30 ) |
30 | 31 |
31 def _bundle(repo, bases, heads, node, suffix, compress=True): | 32 def _bundle(repo, bases, heads, node, suffix, compress=True): |
32 """create a bundle with the specified revisions as a backup""" | 33 """create a bundle with the specified revisions as a backup""" |
33 cgversion = changegroup.safeversion(repo) | 34 cgversion = changegroup.safeversion(repo) |
880 _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements) | 881 _upgradefinishdatamigration(ui, srcrepo, dstrepo, requirements) |
881 | 882 |
882 ui.write(_('data fully migrated to temporary repository\n')) | 883 ui.write(_('data fully migrated to temporary repository\n')) |
883 | 884 |
884 backuppath = tempfile.mkdtemp(prefix='upgradebackup.', dir=srcrepo.path) | 885 backuppath = tempfile.mkdtemp(prefix='upgradebackup.', dir=srcrepo.path) |
885 backupvfs = scmutil.vfs(backuppath) | 886 backupvfs = vfsmod.vfs(backuppath) |
886 | 887 |
887 # Make a backup of requires file first, as it is the first to be modified. | 888 # Make a backup of requires file first, as it is the first to be modified. |
888 util.copyfile(srcrepo.join('requires'), backupvfs.join('requires')) | 889 util.copyfile(srcrepo.join('requires'), backupvfs.join('requires')) |
889 | 890 |
890 # We install an arbitrary requirement that clients must not support | 891 # We install an arbitrary requirement that clients must not support |