In the changeset view, the "Previous" and "Next" links are determined by Changeset#previous and Changeset#next, which currently use only id order within the same repository. However, the changeset list is ordered by committed_on DESC, id DESC in Repository#changesets. Because of this difference, the "Previous" and "Next" links may not follow the same order as the changeset list.
@Go MAEDA Thank you for checking the patch, and sorry for the regression.
The first patch changed Changeset#previous and Changeset#next to always use committed_on/id ordering. This broke Mercurial repositories because Repository::Mercurial intentionally orders changesets by id, which corresponds to the Mercurial revision order used by the existing tests.
I have attached an updated patch. Changeset#previous and Changeset#next now delegate the lookup to the repository. The default Repository implementation uses committed_on/id ordering to match the changeset list order, while Repository::Mercurial overrides it and keeps the existing id-based behavior.