Skip to content
Snippets Groups Projects
Commit 1486d8c63f64 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

persistent-nodemap: avoid writing nodemap for empty revlog

The format cannot encode the lack of tip_rev.

There is currently nothing known to write such empty nodemap right now, but the
change we are preparing on default reveal this issue. So I had rather fix it on
stable.
parent e306d552dfb1
No related branches found
No related tags found
2 merge requests!732persistent-nodemap: avoid writing nodemap for empty revlog,!727no longer inline changelogs
......@@ -163,6 +163,8 @@
def persist_nodemap(tr, revlog, pending=False, force=False):
"""Write nodemap data on disk for a given revlog"""
if len(revlog.index) <= 0:
return
if getattr(revlog, 'filteredrevs', ()):
raise error.ProgrammingError(
"cannot persist nodemap of a filtered changelog"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment