Order DiffCommits by primary key by default

Review Request #10521 — Created April 9, 2019 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

There are a few places where we are querying for DiffCommits but aren't
providing an ORDER BY clause, so we get them in whatever order the
database provides. SQLite returns them by primary key, but MySQL does
not, which leads to commits being out of order is certain places (such
as the CommitListField in change descriptions).

We always want DiffCommits ordered by primary key, so we make that the
default. Any query in which this is not the case can explicitly provide
an ORDER BY clause.

Ran unit tests.

Changes between revision 2 and 3

orig
1
2
3

Commits

Summary ID Author
Order DiffCommits by primary key by default
There are a few places where we are querying for DiffCommits but aren't providing an `ORDER BY` clause, so we get them in whatever order the database provides. SQLite returns them by primary key, but MySQL does not, which leads to commits being out of order is certain places (such as the CommitListField in change descriptions). We *always* want DiffCommits ordered by primary key, so we make that the default. Any query in which this is not the case can explicitly provide an `ORDER BY` clause.
5cab4d875bf6273a62dee6fb837be93462263c51 Barret Rennie
Order DiffCommits by primary key by default
There are a few places where we are querying for DiffCommits but aren't providing an `ORDER BY` clause, so we get them in whatever order the database provides. SQLite returns them by primary key, but MySQL does not, which leads to commits being out of order is certain places (such as the CommitListField in change descriptions). We *always* want DiffCommits ordered by primary key, so we make that the default. Any query in which this is not the case can explicitly provide an `ORDER BY` clause.
53a4e07cb3954ee583c79f4d6d79cd42ca553210 Barret Rennie
reviewboard/diffviewer/tests/test_diffcommit.py
Loading...