diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -1148,7 +1148,14 @@ class _InnerRevlog: ) def _divert_index(self): - return self.index_file + b'.a' + index_file = self.index_file + # when we encounter a legacy inline-changelog, split it. However it is + # important to use the expected filename for pending content + # (.a) otherwise hooks won't be seeing the content of the + # pending transaction. + if index_file.endswith(b'.s'): + index_file = self.index_file[:-2] + return index_file + b'.a' def delay(self): assert not self.is_open diff --git a/tests/test-split-legacy-inline-changelog.t b/tests/test-split-legacy-inline-changelog.t --- a/tests/test-split-legacy-inline-changelog.t +++ b/tests/test-split-legacy-inline-changelog.t @@ -98,9 +98,7 @@ Before 6.7.3 this used to delete the cha $ echo b > b $ hg add b $ hg commit -m "second changeset" - pre-txn tip rev: 1 (missing-correct-output !) - warning: ignoring unknown working parent 11b63e930bf2! (known-bad-output !) - pre-txn tip rev: 0 (known-bad-output !) + pre-txn tip rev: 1 $ hg verify checking changesets checking manifests @@ -195,8 +193,7 @@ Before 6.7.3 this used to delete the ser adding changesets adding manifests adding file changes - pre-txn tip rev: 1 (missing-correct-output !) - pre-txn tip rev: 0 (known-bad-output !) + pre-txn tip rev: 1 added 1 changesets with 1 changes to 1 files $ cd .. @@ -289,8 +286,7 @@ Before 6.7.3 this used to delete the ser remote: adding changesets remote: adding manifests remote: adding file changes - remote: pre-txn tip rev: 1 (missing-correct-output !) - remote: pre-txn tip rev: 0 (known-bad-output !) + remote: pre-txn tip rev: 1 remote: added 1 changesets with 1 changes to 1 files $ cd ..