Fix "Warn if one of the marks, mapping, or heads files are empty"

The commit "Warn if one of the marks, mapping, or heads files are
empty" (7224e420a7) mixed up the state and heads caches and reported
that the heads cache was empty if the state case was. Error found by
Shun-ichi Goto.

Closes #338
This commit is contained in:
Frej Drejhammar
2025-06-05 16:35:08 +02:00
parent ae21cbf1a2
commit f71385ec14

View File

@@ -539,7 +539,7 @@ def hg2git(repourl,m,marksfile,mappingfile,headsfile,tipfile,
if len(state_cache) != 0:
for (name, data) in [(marksfile, old_marks),
(mappingfile, mapping_cache),
(headsfile, state_cache)]:
(headsfile, heads_cache)]:
check_cache(name, data)
ui,repo=setup_repo(repourl)