Fix post-commit UI for small Mercurial repositories.

Review Request #12843 — Created Feb. 24, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

The way that the initial commit was represented when fetching lists of
commits for Mercurial repositories wasn't correct, reporting an ID of 40
consecutive zeros, instead of an empty parent ID. The result of this is
that when the "New Review Request" UI hit the end of the commit list, it
would end up in an infinite loop requesting new commits starting at
00000....

This change fixes all affected backends to convert the 000 commit to a
proper empty string.

  • Loaded the /r/new/ UI for a tiny Mercurial repository and saw that it
    no longer made infinite requests for commits.
  • Ran unit tests.

Diff Revision 2 (Latest)

orig
1
2

Commits

First Last Summary ID Author
Fix post-commit UI for small Mercurial repositories.
The way that the initial commit was represented when fetching lists of commits for Mercurial repositories wasn't correct, reporting an ID of 40 consecutive zeros, instead of an empty parent ID. The result of this is that when the "New Review Request" UI hit the end of the commit list, it would end up in an infinite loop requesting new commits starting at `00000...`. This change fixes all affected backends to convert the 000 commit to a proper empty string. Testing Done: - Loaded the /r/new/ UI for a tiny Mercurial repository and saw that it no longer made infinite requests for commits. - Ran unit tests.
635acf2e646dc0681c4acd39957d3e0cb569c5d9 David Trowbridge
reviewboard/scmtools/hg.py
reviewboard/scmtools/tests/test_hg.py
Loading...