diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -538,7 +538,7 @@ opts = self.opener.options if b'revlogv2' in opts: - newversionflags = REVLOGV2 | FLAG_INLINE_DATA + newversionflags = REVLOGV2 elif b'revlogv1' in opts: newversionflags = REVLOGV1 | FLAG_INLINE_DATA if b'generaldelta' in opts: @@ -653,7 +653,11 @@ % (flags >> 16, fmt, self.indexfile) ) - self._inline = versionflags & FLAG_INLINE_DATA + # There is a bug in the transaction handling when going from an + # inline revlog to a separate index and data file. Turn it off until + # it's fixed, since v2 revlogs sometimes get rewritten on exchange. + # See issue6485 + self._inline = False # generaldelta implied by version 2 revlogs. self._generaldelta = True diff --git a/tests/test-revlog-v2.t b/tests/test-revlog-v2.t --- a/tests/test-revlog-v2.t +++ b/tests/test-revlog-v2.t @@ -58,8 +58,8 @@ $ f --hexdump --bytes 4 .hg/store/00changelog.i .hg/store/00changelog.i: - 0000: 00 01 de ad |....| + 0000: 00 00 de ad |....| $ f --hexdump --bytes 4 .hg/store/data/foo.i .hg/store/data/foo.i: - 0000: 00 01 de ad |....| + 0000: 00 00 de ad |....|