comparison mercurial/upgrade_utils/engine.py @ 47149:396442cd7e6a

revlog: rename `datafile` to `datafile` We want to make the actual location of the datafile and location more of an implementation details than what is is currently. In that process, we make the attribute private. Differential Revision: https://phab.mercurial-scm.org/D10575
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 03 May 2021 12:22:26 +0200
parents a07d5cb03a85
children a43d256c041a
comparison
equal deleted inserted replaced
47148:a07d5cb03a85 47149:396442cd7e6a
80 80
81 oldvfs = oldrl.opener 81 oldvfs = oldrl.opener
82 newvfs = newrl.opener 82 newvfs = newrl.opener
83 oldindex = oldvfs.join(oldrl._indexfile) 83 oldindex = oldvfs.join(oldrl._indexfile)
84 newindex = newvfs.join(newrl._indexfile) 84 newindex = newvfs.join(newrl._indexfile)
85 olddata = oldvfs.join(oldrl.datafile) 85 olddata = oldvfs.join(oldrl._datafile)
86 newdata = newvfs.join(newrl.datafile) 86 newdata = newvfs.join(newrl._datafile)
87 87
88 with newvfs(newrl._indexfile, b'w'): 88 with newvfs(newrl._indexfile, b'w'):
89 pass # create all the directories 89 pass # create all the directories
90 90
91 util.copyfile(oldindex, newindex) 91 util.copyfile(oldindex, newindex)
92 copydata = oldrl.opener.exists(oldrl.datafile) 92 copydata = oldrl.opener.exists(oldrl._datafile)
93 if copydata: 93 if copydata:
94 util.copyfile(olddata, newdata) 94 util.copyfile(olddata, newdata)
95 95
96 if rl_type & store.FILEFLAGS_FILELOG: 96 if rl_type & store.FILEFLAGS_FILELOG:
97 destrepo.svfs.fncache.add(unencodedname) 97 destrepo.svfs.fncache.add(unencodedname)