Order DiffCommits by primary key by default

Review Request #10521 — Created April 9, 2019 and updated

brennie
Review Board
release-4.0.x
reviewboard

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.

Summary
Order DiffCommits by primary key by default
Description From Last Updated

Can you add a unit test for this?

daviddavid
brennie
Review request changed

Change Summary:

Added unit test.

Testing Done:

  +

Ran unit tests.

Commits:

Summary
-
Order DiffCommits by primary key by default
+
Order DiffCommits by primary key by default

Diff:

Revision 2 (+12)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. 
      
  2. Can you add a unit test for this?

  3. 
      
Loading...