https://bz.mercurial-scm.org/show_bug.cgi?id=5541 https://www.illumos.org/issues/8084 --- mercurial-6.8.1/hgext/journal.py.orig +++ mercurial-6.8.1/hgext/journal.py @@ -419,6 +419,7 @@ ) return if not version: + f.seek(0, os.SEEK_SET) # empty file, write version first f.write((b"%d" % storageversion) + b'\0') f.seek(0, os.SEEK_END)