##// END OF EJS Templates
persistent-nodemap: properly delete all nodemap files on downgrade...
marmoute -
r49539:d55c4472 default
parent child Browse files
Show More
@@ -144,10 +144,12 b' def update_persistent_nodemap(revlog):'
144
144
145 def delete_nodemap(tr, repo, revlog):
145 def delete_nodemap(tr, repo, revlog):
146 """Delete nodemap data on disk for a given revlog"""
146 """Delete nodemap data on disk for a given revlog"""
147 if revlog._nodemap_file is None:
147 prefix = revlog.radix
148 msg = "calling persist nodemap on a revlog without the feature enabled"
148 pattern = re.compile(br"(^|/)%s(-[0-9a-f]+\.nd|\.n(\.a)?)$" % prefix)
149 raise error.ProgrammingError(msg)
149 dirpath = revlog.opener.dirname(revlog._indexfile)
150 repo.svfs.tryunlink(revlog._nodemap_file)
150 for f in revlog.opener.listdir(dirpath):
151 if pattern.match(f):
152 repo.svfs.tryunlink(f)
151
153
152
154
153 def persist_nodemap(tr, revlog, pending=False, force=False):
155 def persist_nodemap(tr, revlog, pending=False, force=False):
@@ -809,8 +809,6 b' downgrading'
809 - manifest
809 - manifest
810
810
811 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
811 $ ls -1 .hg/store/ | egrep '00(changelog|manifest)(\.n|-.*\.nd)'
812 00changelog-*.nd (glob)
813 00manifest-*.nd (glob)
814 undo.backup.00changelog.n
812 undo.backup.00changelog.n
815 undo.backup.00manifest.n
813 undo.backup.00manifest.n
816 $ hg debugnodemap --metadata
814 $ hg debugnodemap --metadata
General Comments 0
You need to be logged in to leave comments. Login now